This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Change section flags in linker script


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]