Why do assembly programs load segments (.data/.bss and .text) into separate memory blocks instead of loading both the data and the code se
.data
.bss
.text
You can normally set attributes on a segment-by-segment basis. For example, a read-only segment lets you specify "read-only" once, and just put read-only data into that segment, rather than specifying read-only on a variable-by-variable basis.