[PATCH] Create a hook in the TargetHandler to find out which atoms need to have dynamic symbol table entry

Simon Atanasyan simon at atanasyan.com
Sat Jan 18 13:54:06 PST 2014


Hi Bigcheese, ruiu, shankarke,

**[ELF]** Find out which atoms need to have dynamic symbol table entry using new virtual `TargetHandler::needsDynSymEntry()` method. Move default conditions from `DynamicLibraryWriter<ELFT>::buildDynamicSymbolTable` and `OutputELFWriter<ELFT>::buildDynamicSymbolTable` methods to the `DefaultTargetHandler::needsDynSymEntry()` routine. Delete redundant `DynamicLibraryWriter<ELFT>::buildDynamicSymbolTable` method.

**[Mips]** If symbol is referenced by an entry in the global part of GOT, it needs to be exported. Override `needsDynSymEntry()` to satisfy this requirement.

In general, MIPS related modifications can be moved out from this patch. I include them to demonstrate the goal of these changes.

http://llvm-reviews.chandlerc.com/D2574

Files:
  lib/ReaderWriter/ELF/DefaultTargetHandler.h
  lib/ReaderWriter/ELF/DynamicLibraryWriter.h
  lib/ReaderWriter/ELF/Mips/MipsSectionChunks.h
  lib/ReaderWriter/ELF/Mips/MipsTargetHandler.cpp
  lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h
  lib/ReaderWriter/ELF/OutputELFWriter.h
  lib/ReaderWriter/ELF/TargetHandler.h
  test/elf/Mips/exe-dynsym.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2574.1.patch
Type: text/x-patch
Size: 8480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140118/7c5c0965/attachment.bin>


More information about the llvm-commits mailing list