This is the mail archive of the binutils@sources.redhat.com 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]

Re: link script question - adding sections at specific addresses


On Thu, 3 Aug 2000, Becky Gill wrote:

> 1) Can someone explain how to add another text section to an elf32 ppc linux
> executable at a specific address?  I need to add a new section of code that is
> located several pages away from the rest of an application's text and data. 
> I've done a lot of playing around with the default elf32ppclinux.x script, but
> I keep getting the "not enough room for program headers" message, depending on
> where I put it.

As a first step, try replacing SIZEOF_HEADERS in your script with a fixed
constant.  Choose a value somewhat larger than the current header size - 
you seem to have already discovered what this is :-)

If this still gives linker errors, you will need to set up your own
program headers.  Have a look at "Node: PHDRS" in the ld info
documentation.  "readelf -l" will let you look at existing file headers.

Alan Modra
-- 
Linuxcare.  Support for the Revolution.



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