[llvm] r220310 - Drop support for an old version of ld64 (from darwin 9).
Rafael Espindola
rafael.espindola at gmail.com
Tue Oct 21 11:31:09 PDT 2014
Author: rafael
Date: Tue Oct 21 13:31:09 2014
New Revision: 220310
URL: http://llvm.org/viewvc/llvm-project?rev=220310&view=rev
Log:
Drop support for an old version of ld64 (from darwin 9).
Removed:
llvm/trunk/test/MC/MachO/empty-dwarf-lines.s
Modified:
llvm/trunk/include/llvm/MC/MCAsmInfo.h
llvm/trunk/lib/MC/MCAsmInfo.cpp
llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
llvm/trunk/lib/MC/MCDwarf.cpp
llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp
llvm/trunk/test/MC/MachO/file.s
Modified: llvm/trunk/include/llvm/MC/MCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfo.h?rev=220310&r1=220309&r2=220310&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAsmInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCAsmInfo.h Tue Oct 21 13:31:09 2014
@@ -92,11 +92,6 @@ protected:
/// is false.
bool HasStaticCtorDtorReferenceInStaticMode;
- /// True if the linker has a bug and requires that the debug_line section be
- /// of a minimum size. In practice such a linker requires a non-empty line
- /// sequence if a file is present. Default to false.
- bool LinkerRequiresNonEmptyDwarfLines;
-
/// This is the maximum possible length of an instruction, which is needed to
/// compute the size of an inline asm. Defaults to 4.
unsigned MaxInstLength;
@@ -405,9 +400,6 @@ public:
bool hasStaticCtorDtorReferenceInStaticMode() const {
return HasStaticCtorDtorReferenceInStaticMode;
}
- bool getLinkerRequiresNonEmptyDwarfLines() const {
- return LinkerRequiresNonEmptyDwarfLines;
- }
unsigned getMaxInstLength() const { return MaxInstLength; }
unsigned getMinInstAlignment() const { return MinInstAlignment; }
bool getDollarIsPC() const { return DollarIsPC; }
Modified: llvm/trunk/lib/MC/MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfo.cpp?rev=220310&r1=220309&r2=220310&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfo.cpp Tue Oct 21 13:31:09 2014
@@ -32,7 +32,6 @@ MCAsmInfo::MCAsmInfo() {
HasMachoZeroFillDirective = false;
HasMachoTBSSDirective = false;
HasStaticCtorDtorReferenceInStaticMode = false;
- LinkerRequiresNonEmptyDwarfLines = false;
MaxInstLength = 4;
MinInstAlignment = 1;
DollarIsPC = false;
Modified: llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp?rev=220310&r1=220309&r2=220310&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp Tue Oct 21 13:31:09 2014
@@ -42,9 +42,6 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() {
HasMachoTBSSDirective = true; // Uses .tbss
HasStaticCtorDtorReferenceInStaticMode = true;
- // FIXME: Darwin 10 and newer don't need this.
- LinkerRequiresNonEmptyDwarfLines = true;
-
// FIXME: Change this once MC is the system assembler.
HasAggressiveSymbolFolding = false;
Modified: llvm/trunk/lib/MC/MCDwarf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDwarf.cpp?rev=220310&r1=220309&r2=220310&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCDwarf.cpp (original)
+++ llvm/trunk/lib/MC/MCDwarf.cpp Tue Oct 21 13:31:09 2014
@@ -344,18 +344,6 @@ void MCDwarfLineTable::EmitCU(MCObjectSt
for (const auto &LineSec : MCLineSections.getMCLineEntries())
EmitDwarfLineTable(MCOS, LineSec.first, LineSec.second);
- if (MCOS->getContext().getAsmInfo()->getLinkerRequiresNonEmptyDwarfLines() &&
- MCLineSections.getMCLineEntries().empty()) {
- // The darwin9 linker has a bug (see PR8715). For for 32-bit architectures
- // it requires:
- // total_length >= prologue_length + 10
- // We are 4 bytes short, since we have total_length = 51 and
- // prologue_length = 45
-
- // The regular end_sequence should be sufficient.
- MCDwarfLineAddr::Emit(MCOS, INT64_MAX, 0);
- }
-
// This is the end of the section, so set the value of the symbol at the end
// of this section (that was used in a previous expression).
MCOS->EmitLabel(LineEndSym);
Modified: llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp?rev=220310&r1=220309&r2=220310&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp Tue Oct 21 13:31:09 2014
@@ -15,7 +15,6 @@ AMDGPUMCAsmInfo::AMDGPUMCAsmInfo(StringR
HasSingleParameterDotFile = false;
//===------------------------------------------------------------------===//
HasSubsectionsViaSymbols = true;
- LinkerRequiresNonEmptyDwarfLines = true;
MaxInstLength = 16;
SeparatorString = "\n";
CommentString = ";";
Removed: llvm/trunk/test/MC/MachO/empty-dwarf-lines.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/empty-dwarf-lines.s?rev=220309&view=auto
==============================================================================
--- llvm/trunk/test/MC/MachO/empty-dwarf-lines.s (original)
+++ llvm/trunk/test/MC/MachO/empty-dwarf-lines.s (removed)
@@ -1,29 +0,0 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -s | FileCheck %s
-
-// This tests that when producing files for darwin9 or older we make sure
-// that debug_line sections are of a minimum size to avoid the linker bug
-// described in PR8715.
-
- .section __DATA,__data
- .file 1 "test.c"
- .globl _c ## @c
-_c:
- .asciz "hi\n"
-
-// CHECK: Section {
-// CHECK: Index: 2
-// CHECK-NEXT: Name: __debug_line
-// CHECK-NEXT: Segment: __DWARF
-// CHECK-NEXT: Address: 0x4
-// CHECK-NEXT: Size: 0x2C
-// CHECK-NEXT: Offset: 452
-// CHECK-NEXT: Alignment: 0
-// CHECK-NEXT: RelocationOffset: 0x0
-// CHECK-NEXT: RelocationCount: 0
-// CHECK-NEXT: Type: 0x0
-// CHECK-NEXT: Attributes [ (0x20000)
-// CHECK-NEXT: Debug (0x20000)
-// CHECK-NEXT: ]
-// CHECK-NEXT: Reserved1: 0x0
-// CHECK-NEXT: Reserved2: 0x0
-// CHECK-NEXT: }
Modified: llvm/trunk/test/MC/MachO/file.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/file.s?rev=220310&r1=220309&r2=220310&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/file.s (original)
+++ llvm/trunk/test/MC/MachO/file.s Tue Oct 21 13:31:09 2014
@@ -8,7 +8,7 @@
// CHECK-NEXT: Name: __debug_line
// CHECK-NEXT: Segment: __DWARF
// CHECK-NEXT: Address: 0x1
-// CHECK-NEXT: Size: 0x2D
+// CHECK-NEXT: Size: 0x28
// CHECK-NEXT: Offset: 221
// CHECK-NEXT: Alignment: 0
// CHECK-NEXT: RelocationOffset: 0x0
@@ -20,8 +20,8 @@
// CHECK-NEXT: Reserved1: 0x0
// CHECK-NEXT: Reserved2: 0x0
// CHECK-NEXT: SectionData (
-// CHECK-NEXT: 0000: 29000000 02001E00 00000101 FB0E0D00
+// CHECK-NEXT: 0000: 24000000 02001E00 00000101 FB0E0D00
// CHECK-NEXT: 0010: 01010101 00000001 00000164 69720000
-// CHECK-NEXT: 0020: 666F6F00 01000000 02000001 01
+// CHECK-NEXT: 0020: 666F6F00 01000000
// CHECK-NEXT: )
// CHECK-NEXT: }
More information about the llvm-commits
mailing list