Help needed - defining the output section order

Nick Clifton
Mon Aug 22 14:00:00 GMT 2005

Hi Simon,

> (Also, I still would love to hear an alternative solution that does
> not require the compiler to generate all LD default scripts for each
> platform itself - this sounds like the direct way to version hell).

Ok - how about using objcopy and the --add-section and --remove-section 
switches ?  When you need to resize the fpc.* sections you could use 
--remove-section to strip the old ones of the executable and then 
--add-section to add in the new ones.  Of course this assumes that you 
have some way of recreating the contents of these sections since the 
--add-section switch just reads in a file and dumps its contents into 
the newly created section.


More information about the Binutils mailing list