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]

portable method to add a new output section?


We need to find a method of adding a new (NOLOAD)
output section to an executable file.  The INSERT operation
that Alan Modra implemented recently would be ideal, but we
need to support older GNU linkers, and therefore can't
depend upon this new feature.

We need to add a section that is used by the GCC implementation
of the UPC language that we have developed.  Basically, the
section looks like this:

  .upc_shared 0x1000 (NOLOAD) : { *(upc_shared) }

The default script can be coaxed from ld using the -verbose
option, and we can likely write a perl or sed script that
edits the default script adding a directive like the one
shown above.  This script can then be passed to ld
using the -T switch.

I'm wondering if anyone has been down this road before
and might have a suggestion for a portable method
of adding a new section definition?

(Our preferred implementation targets are
x86, x86_64, and IA64.  That said, we'd like to support
as many targets as possible.)

thanks.


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