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]
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.... 

----elf32_dlx.sh----
SCRIPT_NAME=dlx
TEMPLATE_NAME=generic
OUTPUT_FORMAT="elf32-dlx"
ARCH=dlx
MACHINE=
TEXT_START_ADDR=0
TARGET_PAGE_SIZE=1
EMBEDDED=yes
MAXPAGESIZE=1
--------------------

  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.


    cheers, 
      DaveK
-- 
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]