objcopy test failure on mips-linux

Andreas Jaeger aj@suse.de
Tue Mar 14 10:54:00 GMT 2000


>>>>> Ian Lance Taylor writes:

 >    From: Andreas Jaeger <aj@suse.de>
 >    Date: 14 Mar 2000 14:36:34 +0100

 >    On mips-linux the binutils test "objcopy (simple copy)" fails.
 >    Running the test manually:
 >    $ /home/gast/AJ/build-src/binutils/objcopy tmpdir/bintest.o tmpdir/copy.o
 >    I get the following two files which are different in size:
 >    -rw-rw-r--   1 gast     gast         1448 Mar 14 13:41 bintest.o
 >    -rw-rw-r--   1 gast     gast         1452 Mar 14 13:41 copy.o

 >    Have a look at the different readelf outputs - the rela.text and
 >    rel.text sections are different:

 > Are you using the straight CVS sources?  I have no explanation as to
Yes - without any changes.
 > how or why objcopy is creating a .rela section.  elf32-mips.c defines
 > USE_REL, so it should create a .rel section, not a .rela section.
 > _bfd_elf_new_section_hook should set use_rela_p to false.  When the
 > relocations are written out, _bfd_elf_init_reloc_shdr should see that,
 > and should create a .rel section, not a .rela section.  Something is
 > presumably going wrong in that sequence.
I'll need to setup gdb on that machine first and will check this then. 

But there's something else:
Why is a rela.text section output at all?  The section has size 0.

Andreas

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de


More information about the Binutils mailing list