Help needed - defining the output section order

Simon Kissel
Wed Aug 24 15:43:00 GMT 2005

Hello Segher,

Wednesday, August 24, 2005, 9:30:08 AM, you wrote:

SB> [snip]

>> So what you probably need to do is to add a PHDRS command to your 
>> linker script.

SB> It might be enough if you prevent ld from creating the magic stack
SB> segment behind its own back, e.g., I have this in my Makefiles:

SB> %.o: %.c
SB>          $(CC) $(CFLAGS) -c $< -o $@ && $(OBJCOPY) -R .note.GNU-stack $@

SB> (using /DISCARD/ in your linker script is _not_ enough).

This sounds very interesting - however, I have to admit I don't know
much about makefile syntax and/or gcc options - I'm a pascal guy,
after all ;). To which ld options would this translate to?



More information about the Binutils mailing list