HA: [PATCH] D14382: [ELF2] - Basic implementation of -r/--relocatable

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 12:57:20 PST 2015


On Fri, Nov 06, 2015 at 03:33:02PM -0500, Rafael EspĂ­ndola wrote:
> > The biggest consumer I know immediately is crunchgen. It doesn't really
> > care that much about relocations, but will modify the symbol table to
> > mangle all defined symbols.
> 
> Can you give a high level overview on how it is using ld -r?

Basically, for every subprogram, it links the individual object files of
that subprogram into subprogram.o with ld -r and then does some
post-processing of the symbol table. A library is not really an
alternative as it would be then required to figure out which symbols are
not used etc. All that complexity can be side stepped with ld -r.

Joerg


More information about the llvm-commits mailing list