[PATCH] [lld] [ELF] Fix inclusion of weak symbols in the dynamic symbol table

Rafael Auler rafaelauler at gmail.com
Wed Oct 1 19:00:25 PDT 2014


Hi Bigcheese, shankarke,

This patch implements in the X86_64 ELF lld backend yet another feature that was
only available in the MIPS backend. However, this patch changes generic ELF
classes to make it trivial for other ELF backends to use this logic too. When
creating a dynamic executable that has dynamic relocations against weak
undefined symbols, these symbols must be exported to the dynamic symbol table
to seek a possible resolution at run time.

A common use case is the __gmon_start__ weak glibc undefined symbol.

http://reviews.llvm.org/D5571

Files:
  lib/ReaderWriter/ELF/DefaultLayout.h
  lib/ReaderWriter/ELF/ExecutableWriter.h
  lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h
  lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp
  test/elf/X86_64/weaksym.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5571.14306.patch
Type: text/x-patch
Size: 8725 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141002/50f18541/attachment.bin>


More information about the llvm-commits mailing list