This is the mail archive of the 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: Custom symbol table with linker plugin

Hi Jan,

> The only documentation I found about linker plugins is the GCC WHOPR @
> Is there any other documentation available? I've also found some test plugins in the testsuites. (and the gcc lto plugin)

Sadly no.  Linker plugins are a very under-developed part of the binutils.

> To access the linker's view of the symbol table I first assumed that I only had to subscribe to the "all symbols read" event and that I could access it from there.
> I've tried to record the file handles from each input file (claim_file_hook) and tried to use get_symbols(), without success. (I didn't claim the file as I just want the linker to handle it)

Hmm, I would have expected that to work.  Maybe you do need to claim the files, just so that the symbol lookup will work.

> If there is another way make the standard SYMTAB/STRTAB loadable and 
> place it in the data segment, before bss, that would work too and be a lot easier as well.

I assume that you have tried doing this with a linker script ?

You may be able to use objcopy to adjust the attributes of the symtab and strtab sections.
You may also be able to use objcopy to adjust the lma's of these sections too, although I am not sure how well that will work.


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