[ELF][MIPS] Always collect .reginfo, .MIPS.options, and .MIPS.abiflags input sections

Do not take in account the `Live` flag while collecting .reginfo, .MIPS.options,
and .MIPS.abiflags input sections to produce corresponding output sections.
These sections have information purpose and should be always produced per
ABI requirements.

llvm-svn: 298093
This commit is contained in:
Simon Atanasyan 2017-03-17 14:27:55 +00:00
parent a69dcb6b66
commit 462f84a736
4 changed files with 6 additions and 6 deletions

View File

@ -131,7 +131,7 @@ MipsAbiFlagsSection<ELFT> *MipsAbiFlagsSection<ELFT>::create() {
bool Create = false;
for (InputSectionBase *Sec : InputSections) {
if (!Sec->Live || Sec->Type != SHT_MIPS_ABIFLAGS)
if (Sec->Type != SHT_MIPS_ABIFLAGS)
continue;
Sec->Live = false;
Create = true;
@ -200,7 +200,7 @@ MipsOptionsSection<ELFT> *MipsOptionsSection<ELFT>::create() {
bool Create = false;
for (InputSectionBase *Sec : InputSections) {
if (!Sec->Live || Sec->Type != SHT_MIPS_OPTIONS)
if (Sec->Type != SHT_MIPS_OPTIONS)
continue;
Sec->Live = false;
Create = true;
@ -258,7 +258,7 @@ MipsReginfoSection<ELFT> *MipsReginfoSection<ELFT>::create() {
bool Create = false;
for (InputSectionBase *Sec : InputSections) {
if (!Sec->Live || Sec->Type != SHT_MIPS_REGINFO)
if (Sec->Type != SHT_MIPS_REGINFO)
continue;
Sec->Live = false;
Create = true;

View File

@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
# RUN: %S/Inputs/mips-dynamic.s -o %t-so.o
# RUN: ld.lld %t-so.o -shared -o %t.so
# RUN: ld.lld %t-so.o --gc-sections -shared -o %t.so
# RUN: llvm-readobj -h -mips-abi-flags %t.so | FileCheck -check-prefix=SO %s
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o

View File

@ -6,7 +6,7 @@
# RUN: echo "SECTIONS { \
# RUN: . = 0x100000000; \
# RUN: .got : { *(.got) } }" > %t.rel.script
# RUN: ld.lld %t1.o %t2.o --script %t.rel.script -shared -o %t.so
# RUN: ld.lld %t1.o %t2.o --gc-sections --script %t.rel.script -shared -o %t.so
# RUN: llvm-readobj -symbols -mips-options %t.so | FileCheck %s
# REQUIRES: mips

View File

@ -3,7 +3,7 @@
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t1.o
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
# RUN: %S/Inputs/mips-dynamic.s -o %t2.o
# RUN: ld.lld %t1.o %t2.o -shared -o %t.so
# RUN: ld.lld %t1.o %t2.o --gc-sections -shared -o %t.so
# RUN: llvm-readobj -symbols -mips-reginfo %t.so | FileCheck %s
# REQUIRES: mips