[PATCH] D22833: Move code for MIPS from createInputSection to initializeSections.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 14:33:38 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL276811: Move code for MIPS from createInputSection to initializeSections. (authored by ruiu).
Changed prior to commit:
https://reviews.llvm.org/D22833?vs=65598&id=65603#toc
Repository:
rL LLVM
https://reviews.llvm.org/D22833
Files:
lld/trunk/ELF/InputFiles.cpp
Index: lld/trunk/ELF/InputFiles.cpp
===================================================================
--- lld/trunk/ELF/InputFiles.cpp
+++ lld/trunk/ELF/InputFiles.cpp
@@ -252,6 +252,14 @@
// they can be used to reason about object compatibility.
Sections[I] = &InputSection<ELFT>::Discarded;
break;
+ case SHT_MIPS_REGINFO:
+ MipsReginfo.reset(new MipsReginfoInputSection<ELFT>(this, &Sec));
+ Sections[I] = MipsReginfo.get();
+ break;
+ case SHT_MIPS_OPTIONS:
+ MipsOptions.reset(new MipsOptionsInputSection<ELFT>(this, &Sec));
+ Sections[I] = MipsOptions.get();
+ break;
default:
Sections[I] = createInputSection(Sec);
}
@@ -298,19 +306,6 @@
if (Config->StripDebug && Name.startswith(".debug"))
return &InputSection<ELFT>::Discarded;
- // A MIPS object file has a special sections that contain register
- // usage info, which need to be handled by the linker specially.
- if (Config->EMachine == EM_MIPS) {
- switch (Sec.sh_type) {
- case SHT_MIPS_REGINFO:
- MipsReginfo.reset(new MipsReginfoInputSection<ELFT>(this, &Sec));
- return MipsReginfo.get();
- case SHT_MIPS_OPTIONS:
- MipsOptions.reset(new MipsOptionsInputSection<ELFT>(this, &Sec));
- return MipsOptions.get();
- }
- }
-
// The linker merges EH (exception handling) frames and creates a
// .eh_frame_hdr section for runtime. So we handle them with a special
// class. For relocatable outputs, they are just passed through.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22833.65603.patch
Type: text/x-patch
Size: 1520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160726/3f3febcd/attachment.bin>
More information about the llvm-commits
mailing list