This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Question about final link in custom bfd target
- From: Anthony Brandon <anthony dot brandon at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 8 Oct 2014 17:51:55 +0200
- Subject: Question about final link in custom bfd target
- Authentication-results: sourceware.org; auth=none
Hello,
I'm not sure if this is the right mailing list for this question but
hopefully you can help me out.
We have developed a new target for binutils for a processor we are
using for research. The file format we target is elf and the linker is
ld.
Most of the things seem to be working, but specifically the
--emit-relocs flag doesn't do anything. While looking into this I
found that the default final link function is bfd_generic_final_link,
which doesn't know about that flag. So I tried changing the final link
function to bfd_elf_gc_common_final_link.
This doesn't seem to work as the linker doesn't produce any output,
not even error messages.
Note that our elf32-rvex.c file contains almost nothing beside the
struct array of relocation types and a couple of defines for things
like endiannes and reloc name and howto lookups.
If I look at something like elf32-arm.c I can see that they define
many additional functions for things like final link, and other
relocation related things. Do I need to define all those as well to
get --emit-relocs to work, or are there some other default functions
like bfd_elf_gc_common_final_link that I should be using?
Since the default case seems to almost work as expected I think I'm
missing some simple step.
Thanks in advance,
Anthony