This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Symbol merging for MIPS*/ELF
- To: Ian Lance Taylor <ian at zembu dot com>
- Subject: Re: Symbol merging for MIPS*/ELF
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- Date: Mon, 15 Nov 1999 10:43:59 +0100 (MET)
- cc: binutils at sourceware dot cygnus dot com
- Organization: Technical University of Gdansk
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 +