[PATCH] D26474: Parse resolations only once

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 9 14:39:12 PST 2016


rafael created this revision.
rafael added a reviewer: ruiu.
rafael added a subscriber: llvm-commits.

Relocations are the last thing that we wore storing a raw section pointer to and parsing on demand.

With this patch we parse it only once and store a pointer to the actual data.

The patch also changes where we store it. It is now in InputSectionBase. Not all sections have relocations, but most do and this simplifies the logic. It also means that we now only support one relocation section per section. Given that that constraint is maintained even with -r with gold bfd and lld, I think it is OK.


https://reviews.llvm.org/D26474

Files:
  ELF/ICF.cpp
  ELF/InputFiles.cpp
  ELF/InputFiles.h
  ELF/InputSection.cpp
  ELF/InputSection.h
  ELF/MarkLive.cpp
  ELF/OutputSections.cpp
  ELF/Relocations.cpp
  ELF/Relocations.h
  ELF/Writer.cpp
  test/ELF/invalid/invalid-elf.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26474.77396.patch
Type: text/x-patch
Size: 15828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161109/ad9e0583/attachment.bin>


More information about the llvm-commits mailing list