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]

Re: Question about final link in custom bfd target


I think I found it in the internals documentation. It seems like I
need to define the relocate_section function if I want to use the elf
final_link function.

On Wed, Oct 8, 2014 at 5:51 PM, Anthony Brandon
<anthony.brandon@gmail.com> wrote:
> 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



-- 
Anthony


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