This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Some help is needed...
- From: Fabio Alemagna <falemagn at studenti dot unina dot it>
- To: <binutils at sources dot redhat dot com>
- Date: Tue, 21 Jan 2003 04:14:33 +0100 (CET)
- Subject: Some help is needed...
Ok, I'm quite exausted and my head is hurting... I cannot find the right
place to do what I want to, and solving the problem with
elf_backend_emit_relocs doesn't really appeal me that much (and I'm not
even sure it's the right place).
So, here I'm exposing what I want to do, hoping that someone of you will
tell me which is the function that I should override to implement it.
First of all, I need complete access to the relocations, the symbols they
refer to, and the sections the symbols refer to.
I have in mind to do a sort of "postprocessing" on the reloc entries: I
just need to make them be relative to the section symbol which refers to
the same section that the reloc's symbols refers to.
For example, say I have a R_386_32 reloc entry, say this entry references
the symbol number 67, and say that this symbol is relative to the section
number 3: I just need to make the reloc entry reference the symbol number
3.
Pseudocode: reloc.symbol = reloc.symbol.section_number;
Is that clear?
I tried to implement this in final_link, however although there I have
access to the reloc entries, I don't seem to have access to the symbol
table: am I wrong? Is there a way to get access to the symbol table in
final_link?
Regards,
Fabio Alemagna