This is the mail archive of the binutils@sourceware.org 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]

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


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