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

> > bfd_elf32_bfd_final_link ?  Are there any generic-elf versions of 
> > these routines that I can call into play, or are they 
> vastly different for different target architectures ?
> The hash_table_create(), add_symbols(), and final_link() 
> routines must all work together.  If you want to use the ELF 
> hash_table_create() routine, you must use the ELF 
> add_symbols() and final_link() routines.
> 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.
> If you don't need to support shared objects, most of these 
> backend routines can be pretty simple.  The most interesting 
> one would be
> relocate_section() which must handle all your relocations.
> Ian

  <mahir>I kiss you!</mahir>

  Thankyou, thankyou, thankyou!

  I think that's exactly what I needed to know.  The dlx target is really
quite simple, no dynamic linking, no shared objects, no got/plt, just a
simple little embedded target.  I'm going to look at the m68hc11 as a model
and I guess it shouldn't be too hard. 

  Many thanks to everyone!


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