This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: binutils 2.11-CVS won't link GCC 3.0-snap's libobjc.so on Red Hat
On Wed, Jul 11, 2001 at 03:46:38AM -0300, Alexandre Oliva wrote:
> On Jul 11, 2001, "H . J . Lu" <hjl@lucon.org> wrote:
>
> >> 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
>
> > Try this patch.
>
> > * 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.
>
> Thanks, it does fix the problem, indeed.
>
The problem is introduced by this patch:
http://sources.redhat.com/ml/binutils/2000-11/msg00246.html
In linking.o from libobjc, there are
Relocation section '.rela.sbss' at offset 0x3938 contains 2 entries:
Offset Info Type Symbol's Value Symbol's Name Addend
00000000 1a00000002 R_ALPHA_REFQUAD 0000000000000000
__objc_class_name_Object + 0
00000008 1b00000002 R_ALPHA_REFQUAD 0000000000000000
__objc_class_name_NXConst + 0
and
8 .sbss 00000010 0000000000000000 0000000000000000 00002820 2**3
ALLOC, RELOC
There is no SEC_LOAD on .sbss. But .rela.sbss has to have SEC_LOAD.
Otherwise, you will get that error. Richard's patch fixed debugging
sections, but brake the linker. I will check in my patch if I don't
hear any objections soon.
H.J.