This is the mail archive of the 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: -gc-sections for elf32-dlx and possible buglette in elf32-target.h

> -----Original Message-----
> From: Ian Lance Taylor 
> Sent: 29 January 2004 18:56

> Generic versions of those routines exist in elflink.h, and 
> most ELF targets use them.  In order to use them, you must 
> write several ELF backend routines, at least check_relocs(), 
> adjust_dynamic_symbol(), always_size_sections(), 
> size_dynamic_sections(), relocate_section(), 
> finish_dynamic_symbol(), finish_dynamic_section().  See 
> elf_backend_data in elf-bfd.h.

  Hey, look what else I just discovered....

  I'm not clear whether using the generic template is a problem or not.  The
ldint manual just says:

Most targets use the generic emultempl script, emultempl/generic.em. A
different emultempl script is only needed if the linker must support unusual
actions, such as linking against shared libraries. 

and so I'm wondering if garbage collection counts as one of the 'unusual
actions' referred to above, or if other stuff in the elf backend implicitly
assumes it's running under the elf template?  There are no shared libs or
dynamic objects on the dlx target, which is what most of the stuff in
elf32.em seems to be about, so I'd guess that it might be ok.... but I just
dunno whether the elf backend demands the elf emulation or will be happy
enough without it.  I can't find any other elf targets that think they can
use the generic emulation, though, so it does make me suspicious that it's
wrong to try and use them together.

Can't think of a witty .sigline today....

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