Joined: 24 Aug 2004
Location: Crossing the Cauchy horizon
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.
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.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum