Stop producing .data.rel sections.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 18 Nov 2015 06:02:15 +0000 (06:02 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 18 Nov 2015 06:02:15 +0000 (06:02 +0000)
commitcfc74b78b13cd839c49f1f2b0b7033f32c5c1109
treea9a6af9e1ec8931ae7eea70f2687120e4312c06c
parent35da61aba143cc6d35224ed008b30e07bc6486c3
Stop producing .data.rel sections.

If a section is rw, it is irrelevant if the dynamic linker will write to
it or not.

It looks like llvm implemented this because gcc was doing it. It looks
like gcc implemented this in the hope that it would put all the
relocated items close together and speed up the dynamic linker.

There are two problem with this:
* It doesn't work. Both bfd and gold will map .data.rel to .data and
  concatenate the input sections in the order they are seen.
* If we want a feature like that, it can be implemented directly in the
  linker since it knowns where the dynamic relocations are.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253436 91177308-0d34-0410-b5e6-96231b3b80d8
24 files changed:
include/llvm/MC/MCObjectFileInfo.h
include/llvm/MC/SectionKind.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
lib/MC/MCObjectFileInfo.cpp
lib/MC/MCParser/COFFAsmParser.cpp
lib/MC/MCParser/DarwinAsmParser.cpp
lib/MC/MCParser/ELFAsmParser.cpp
lib/MC/MCWinEH.cpp
lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
lib/Target/Hexagon/HexagonTargetObjectFile.cpp
lib/Target/Mips/MipsTargetObjectFile.cpp
lib/Target/NVPTX/NVPTXTargetObjectFile.h
lib/Target/TargetLoweringObjectFile.cpp
lib/Target/XCore/XCoreTargetObjectFile.cpp
test/CodeGen/AArch64/emutls_generic.ll
test/CodeGen/AArch64/pic-eh-stubs.ll
test/CodeGen/ARM/emutls_generic.ll
test/CodeGen/Mips/emutls_generic.ll
test/CodeGen/X86/emutls-pic.ll
test/CodeGen/X86/emutls-pie.ll
test/CodeGen/X86/emutls_generic.ll
test/CodeGen/X86/rodata-relocs.ll
test/DebugInfo/X86/arange-and-stub.ll