Change section flags in linker script
Dobes
bdobry@udel.edu
Thu Nov 5 23:55:00 GMT 2009
I need to make the text sections in my elf file look like data. Currently, I
am doing this using objcopy and the "--set-section-flags" flag. Since my
executable has many such text sections that I need to make look like data, I
end up having way too many of these flags to pass and it gets ugly, plus it
would be nice to not have to take this extra step of calling objcopy. I
would prefer to modify this flag via the linker script, but I cannot figure
out how to do this. To clarify, here is an example of what I start with
(from objdump -h):
29 .text 00008fe8 a0002010 a0002010 0000132d 2**3
CONTENTS, ALLOC, LOAD, READONLY, CODE
And this is what I want to end up with:
29 .text 00008fe8 a0002010 a0002010 0000132d 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
--
View this message in context: http://old.nabble.com/Change-section-flags-in-linker-script-tp26224492p26224492.html
Sent from the Sourceware - binutils list mailing list archive at Nabble.com.
More information about the Binutils
mailing list