[PATCH] D17199: [mips] Made the .pdr section not allocatable.

Scott Egerton via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 06:31:16 PST 2016


s.egerton created this revision.
s.egerton added reviewers: dsanders, vkalintiris.
s.egerton added a subscriber: llvm-commits.
Herald added a subscriber: dsanders.

This section is used for debug information and has no need to be
allocatable. This also causes errors when compiling the Linux kernel.

http://reviews.llvm.org/D17199

Files:
  lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
  test/MC/Mips/mips-pdr.s

Index: test/MC/Mips/mips-pdr.s
===================================================================
--- test/MC/Mips/mips-pdr.s
+++ test/MC/Mips/mips-pdr.s
@@ -18,8 +18,8 @@
 # OBJOUT: Section {
 # OBJOUT:     Name: .pdr
 # OBJOUT:     Type: SHT_PROGBITS (0x1)
-# OBJOUT:     Flags [ (0xB)
-# OBJOUT:       SHF_ALLOC (0x2)
+# OBJOUT:     Flags [ (0x9)
+# OBJOUT-NOT:   SHF_ALLOC (0x2)
 # OBJOUT:       SHF_WRITE (0x1)
 # OBJOUT:     ]
 # OBJOUT:     Size: 64
Index: lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
===================================================================
--- lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
+++ lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
@@ -611,7 +611,7 @@
   MCStreamer &OS = getStreamer();
 
   MCSectionELF *Sec = Context.getELFSection(".pdr", ELF::SHT_PROGBITS,
-                                            ELF::SHF_ALLOC | ELF::SHT_REL);
+                                            ELF::SHT_REL);
 
   MCSymbol *Sym = Context.getOrCreateSymbol(Name);
   const MCSymbolRefExpr *ExprRef =


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17199.47798.patch
Type: text/x-patch
Size: 1053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160212/b28cb756/attachment.bin>


More information about the llvm-commits mailing list