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]

ppc32 _SDA_BASE_


glibc uses a ld -r stage to build crt1.o, and due to stupidity on my
part ld -r was providing values for _SDA_BASE_.

$ readelf -a /home/alan/toolchain/lib/crt1.o | grep _SDA_BASE_
00000000  00001401 R_PPC_ADDR32      00000000   _SDA_BASE_ + 0
    20: 00000000     0 OBJECT  LOCAL  HIDDEN  ABS _SDA_BASE_

Resulted in failure of gcc.dg/980827-1.

	* emultempl/ppc32elf.em (after_allocation): Don't call
	ppc_elf_set_sdata_syms when relocatable.

Index: ld/emultempl/ppc32elf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/ppc32elf.em,v
retrieving revision 1.6
diff -u -p -r1.6 ppc32elf.em
--- ld/emultempl/ppc32elf.em	12 May 2005 07:32:04 -0000	1.6
+++ ld/emultempl/ppc32elf.em	24 May 2005 00:26:05 -0000
@@ -113,8 +113,9 @@ ppc_before_allocation (void)
 static void
 gld${EMULATION_NAME}_after_allocation (void)
 {
-  if (link_info.hash->creator == &bfd_elf32_powerpc_vec
-      || link_info.hash->creator == &bfd_elf32_powerpcle_vec)
+  if ((link_info.hash->creator == &bfd_elf32_powerpc_vec
+       || link_info.hash->creator == &bfd_elf32_powerpcle_vec)
+      && !link_info.relocatable)
     {
       if (!ppc_elf_set_sdata_syms (output_bfd, &link_info))
 	einfo ("%X%P: cannot set sdata syms %E\n");

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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