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: arm-elf ld fails phdrs test


Hi Guys,

:    Some ELF emulations define OTHER_TEXT_SECTIONS. But they won't
:    show up in ld-scripts/phdrs.t. Maybe we should put all those
:    sections in ld-scripts/phdrs.t.
: 
: We only need to add sections which the linker or assembler creates
: automatically.  We don't need to add anything which can appear in
: OTHER_TEXT_SECTIONS, because the testsuite specifies which sections to
: create.  The testsuite will only get confused when some section is
: automatically created that it doesn't know about.
: 
: In fact, automatically created sections should probably be put in the
: /DISCARD/ section.  The .reginfo section is an example; that is
: created by the MIPS assembler.

So how about changing the test linker script like this:

Index: ld/testsuite/ld-scripts/phdrs.t
===================================================================
RCS file: /cvs/src//src/ld/testsuite/ld-scripts/phdrs.t,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 phdrs.t
*** phdrs.t	1999/05/03 07:29:09	1.1.1.1
--- phdrs.t	2000/03/14 00:54:05
*************** SECTIONS
*** 10,14 ****
    . = 0x80000 + SIZEOF_HEADERS;
    .text : { *(.text) } :text
    .data : { *(.data) } :data
!   /DISCARD/ : { *(.reginfo) }
  }
--- 10,14 ----
    . = 0x80000 + SIZEOF_HEADERS;
    .text : { *(.text) } :text
    .data : { *(.data) } :data
!   /DISCARD/ : { *(.*) }
  }

After all, we are not trying to make an executable program, but only
test that the link will create the expected segments.

Cheers
	Nick

PS.  I tested this patch with the arm-elf toolchain and it fixed the
failure.  I have not tried other elf toolchains though.

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