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]

Re: Linking very large programs with inadequate branch displacements


Hi, All:

Alan, I can't figure out how to hit a breakpoint at
ppc_elf_relax_section:elf32-ppc.c.  Is there a command line switch I
should throw,


Pass --relax to ld.



I have written a trips_elf_relax_section() that appends trampolines to the end of each .text section that needs them. Well and good. The problem is, I cannot get the front end to expand the text sections to accommodate the new trampolines.


The steps include:
* bfd_realloc() the contents with a space large enough for the appended trampolines.
* Update sec->_raw_size with the new section size.
* Update elf_section_data (sec)->this_hdr.contents with the new contents.
* Set *again to 'true' before returning to lang_size_sections_1().


Despite these steps, the front end calls the trips_elf_relocate_section() with no adjustment to the original section sizes. What is the key to true relaxation? Does it matter that I'm working with 2.12.90 sources?

Thanks in advance,
Bill


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