Support dead-stripping in ELF objects

Robinson, Paul Paul.Robinson at am.sony.com
Thu Mar 21 11:13:38 PDT 2013


A while back I implemented some private changes to how relocations
were handled in the ELF object writer, so that our linker could
support dead-stripping.  Apparently MachO has a similar feature, so I
leveraged some of what was done for that target, including reusing the
assembler flag/directive.

I'm told that there may be broader interest in supporting
dead-stripping in ELF objects, so here's the patch.  

There is currently no in-tree ELF-using target that invokes this
stuff; I'm putting it out there so anyone who's interested can take
advantage of it in their own target/toolchain.

Please review, and commit for me if it's okay.

Thanks,
--paulr






More information about the llvm-commits mailing list