This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
C6x: Fix another problem with rela. and rel. sections
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: binutils at sources dot redhat dot com
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Thu, 23 Sep 2010 00:04:51 +0200
- Subject: C6x: Fix another problem with rela. and rel. sections
TI's compiler for C6x produces both rel. and rela. sections. When
compiling the kernel with it, we end up with rela.init.text and
rel.init.text, and when we then try to use GNU ld to link these objects
together using "-r", the linker aborts with
ld: init/mounts.o: relocation size mismatch in init/do_mounts.o section
.text
ld: final link failed: File in wrong format
That's because in the output we've only made one of the two sections. I
looked around in other targets for ways to fix it, and came across a
definition of elf_fake_sections in elf32-m32r.c. Adding such a function
to elf32-tic6x.c seems to fix the problem.
Ok?
Bernd
Attachment:
fake.diff
Description: Text document