This is the mail archive of the binutils@sourceware.cygnus.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: Symbol merging for MIPS*/ELF


On 10 Nov 1999, Ian Lance Taylor wrote:

> Can you use bfd_get_section_by_name instead of introducing
> bfd_section_from_elf_name?

 No I can't.  abfd->sections might be nullified at the moment (search
elflink.h for "We do not want to include any of the sections" to see where
it happens) and bfd_get_section_by_name wouldn't return anything useful.
Hence, bfd_section_from_elf_name obtains sections from ELF headers (it's
derived from bfd_section_from_elf_index, actually).

> What happens if the section you are looking (.text or .data) for is
> not present?  Is there any reason to assume that it must be present?

 I presume if SHN_MIPS_* are used, the respective sections are present (at
least this seems to be always the case when using BFD).  But I cannot
write anything of MIPS tools from other vendors.  Let MIPS people comment
on this.  I put an assertion to detect such cases, anyway.

> Those patches were from Kazumoto Kojima
> <kkojima@info.kanagawa-u.ac.jp>, and were intended to support dynamic
> linking for MIPS GNU/Linux.  It may be that we should not be
> generating SHN_MIPS_TEXT and SHN_MIPS_DATA in output files.  This may
> be an Irix specific thing.  I don't know.

 Well, it looks like other Linux ports can live without special sections
and still they support dynamic linking.  I suppose they exist to allow
Linux binaries to be run on some other MIPS operating system. 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


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