flat assembler
Message board for the users of flat assembler.
Index
> Main > Sections/segments a) readable b) order |
Author |
|
revolution 07 Oct 2017, 05:15
1) The OS probably gives all sections the readable attribute even if you don't specify it, but this is only my guess. You will need to check the docs to see what Linux does here. Usually only executable sections make sense to be non-readable and non-writeable.
2) The order does not matter, You can put things in any order you want. |
|||
07 Oct 2017, 05:15 |
|
Tomasz Grysztar 07 Oct 2017, 13:13
The sections in ELF format do not have an attribute that would mean "readable". Only the run-time segments have, but they are a different entity (defined in "Program Header").
|
|||
07 Oct 2017, 13:13 |
|
_shura 07 Oct 2017, 17:47
Actually, Linux set all segments readable and executable by default, even if the segment is neither readable, writeable nor executable, as long as your executable file does not contain a gnu-stack-segment. So if you create a executable file, please use »segment gnustack«, if you create an object-file, please link everything with »ld -z noexecstack«. Anyway, afaik everything is readable, even if you did not actually set this flag.
Afaik there where some linux-versions, where the last segment must be writeable (I guess, it had something to do with the stack, that should be, of course, writeable), but I do not know, whether this is true for section or not. |
|||
07 Oct 2017, 17:47 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.