Skip to content

Commit baec95a

Browse files
committedFeb 15, 2016
[mips] Removed the SHF_ALLOC flag from the .pdr section.
Summary: This section is used for debug information and has no need to be in memory at runtime. With this patch, LLVM now emits the same flags as the GNU assembler. This patch also fixes an error when compiling the Linux kernel, The error is that there are relocations within the .pdr section in a VDSO. Reviewers: vkalintiris, dsanders Subscribers: llvm-commits, dsanders Differential Revision: http://reviews.llvm.org/D17199 llvm-svn: 260879
1 parent 4dc7d39 commit baec95a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ void MipsTargetELFStreamer::emitDirectiveEnd(StringRef Name) {
611611
MCStreamer &OS = getStreamer();
612612

613613
MCSectionELF *Sec = Context.getELFSection(".pdr", ELF::SHT_PROGBITS,
614-
ELF::SHF_ALLOC | ELF::SHT_REL);
614+
ELF::SHT_REL);
615615

616616
MCSymbol *Sym = Context.getOrCreateSymbol(Name);
617617
const MCSymbolRefExpr *ExprRef =

‎llvm/test/MC/Mips/mips-pdr.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
# OBJOUT: Section {
1919
# OBJOUT: Name: .pdr
2020
# OBJOUT: Type: SHT_PROGBITS (0x1)
21-
# OBJOUT: Flags [ (0xB)
22-
# OBJOUT: SHF_ALLOC (0x2)
21+
# OBJOUT: Flags [ (0x9)
22+
# OBJOUT-NOT: SHF_ALLOC (0x2)
2323
# OBJOUT: SHF_WRITE (0x1)
2424
# OBJOUT: ]
2525
# OBJOUT: Size: 64

0 commit comments

Comments
 (0)