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]

Re: binutils 2.11-CVS won't link GCC 3.0-snap's libobjc.so on Red Hat


On Tue, Jul 10, 2001 at 07:28:27PM -0300, Alexandre Oliva wrote:
> Bootstrapping GCC 3.0's latest snapshot on alphaev6-unknown-linux-gnu
> (Red Hat Linux 7 for alpha) using binutils 2.11's CVS tree failed to
> link libobjc.so as follows:
> 
> /tmp/egcs/gcc/xgcc -B/tmp/egcs/gcc/ -B/home/lsd/oliva/test/egcs/alpha-Linux-2.2.17-14smp/alphaev6-unknown-linux-gnu/bin/ -B/home/lsd/oliva/test/egcs/alpha-Linux-2.2.17-14smp/alphaev6-unknown-linux-gnu/lib/ -isystem /home/lsd/oliva/test/egcs/alpha-Linux-2.2.17-14smp/alphaev6-unknown-linux-gnu/include -L/tmp/egcs/ld -shared  .libs/archive.o .libs/class.o .libs/encoding.o .libs/gc.o .libs/hash.o .libs/init.o .libs/linking.o .libs/misc.o .libs/nil_method.o .libs/NXConstStr.o .libs/Object.o .libs/objects.o .libs/Protocol.o .libs/sarray.o .libs/selector.o .libs/sendmsg.o .libs/thr.o .libs/thr-objc.o  -L/tmp/egcs/ld -lc  -Wl,-soname -Wl,libobjc.so.1 -o .libs/libobjc.so.1.0.0
> lt-ld-new: .libs/libobjc.so.1.0.0: Not enough room for program headers (allocated 3, need 4)
> lt-ld-new: final link failed: Bad value
> collect2: ld returned 1 exit status
> 
> This also happened last week.  Unfortunately, I haven't bootstrapped
> GCC+binutils for 2 or 3 weeks before that, so I can't tell for how
> long the problem has been there.  I'm sure it wasn't there at the time
> of GCC 3.0, though, which is odd.  I guess it's something in GCC that
> exposes a problem in binutils, since the problem is already present in
> GNU binutils 2.11, but not in Red Hat Linux 7 for alpha's
> binutils-2.10.0.18-3.
> 

Try this patch.


H.J.
----
2001-07-10  H.J. Lu  <hjl@gnu.org>

	* elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
	ALLOC|LOAD flags as the source section when creating the reloc
	section for debugging sections.

Index: elf64-alpha.c
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/elf64-alpha.c,v
retrieving revision 1.28
diff -u -p -r1.28 elf64-alpha.c
--- elf64-alpha.c	2001/05/23 18:36:03	1.28
+++ elf64-alpha.c	2001/07/11 04:36:14
@@ -2589,8 +2589,13 @@ elf64_alpha_check_relocs (abfd, info, se
 		  sreloc = bfd_make_section (dynobj, rel_sec_name);
 		  if (sreloc == NULL
 		      || !bfd_set_section_flags (dynobj, sreloc,
-						 ((sec->flags & (SEC_ALLOC
-								 | SEC_LOAD))
+						 (((sec->flags
+						    & SEC_DEBUGGING)
+						   ? (sec->flags
+						      & (SEC_ALLOC
+							 | SEC_LOAD))
+						   : (SEC_ALLOC
+						      | SEC_LOAD))
 						  | SEC_HAS_CONTENTS
 						  | SEC_IN_MEMORY
 						  | SEC_LINKER_CREATED


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