[PATCH] D26444: [ELF][MIPS] Convert .reginfo and .MIPS.options sections to synthetic input sections

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 9 02:34:01 PST 2016


atanasyan created this revision.
atanasyan added a reviewer: ruiu.
atanasyan added a subscriber: llvm-commits.
atanasyan set the repository for this revision to rL LLVM.
atanasyan added a project: lld.
Herald added a subscriber: sdardis.

Previously, we have both input and output sections for .reginfo and .MIPS.options. Now for each such sections we have one synthetic input sections: MipsReginfoSection and MipsOptionsSection respectively.

Both sections are handled as regular sections until the control reaches Writer. Writer then aggregates all sections whose type is SHT_MIPS_REGINFO or SHT_MIPS_OPTIONS to create a single synthesized input section. In that moment Writer also save GP0 value to the MipsGp0 field of the corresponding ObjectFile. This value required for R_MIPS_GPREL16 and R_MIPS_GPREL32 relocations calculation.

This patch supersedes https://reviews.llvm.org/D26327.


Repository:
  rL LLVM

https://reviews.llvm.org/D26444

Files:
  ELF/InputFiles.cpp
  ELF/InputFiles.h
  ELF/InputSection.cpp
  ELF/InputSection.h
  ELF/OutputSections.cpp
  ELF/OutputSections.h
  ELF/Relocations.cpp
  ELF/SyntheticSections.cpp
  ELF/SyntheticSections.h
  ELF/Writer.cpp
  test/ELF/basic-mips.s
  test/ELF/invalid/mips-invalid-options-descriptor.s
  test/ELF/invalid/mips-multiple-options.test
  test/ELF/invalid/mips-multiple-reginfo.test
  test/ELF/mips-gprel32-relocs-gp0.s
  test/ELF/mips-n32-rels.s
  test/ELF/mips-options-r.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26444.77326.patch
Type: text/x-patch
Size: 27490 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161109/2d83dd2b/attachment.bin>


More information about the llvm-commits mailing list