summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetLoweringObjectFile.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reverting the EH table patches.Bill Wendling2009-11-191-2/+2
| | | | | | | | | | | | | $ svn merge -c -89279 https://llvm.org/svn/llvm-project/llvm/trunk --- Reverse-merging r89279 into '.': U lib/CodeGen/AsmPrinter/DwarfException.cpp U lib/Target/TargetLoweringObjectFile.cpp $ svn merge -c -89270 https://llvm.org/svn/llvm-project/llvm/trunk --- Reverse-merging r89270 into '.': G lib/CodeGen/AsmPrinter/DwarfException.cpp G lib/Target/TargetLoweringObjectFile.cpp llvm-svn: 89379
* The "ReadOnlyWithRel" enum seems to apply more to what Darwin does with the EHBill Wendling2009-11-191-1/+1
| | | | | | exception table than DataRel. llvm-svn: 89279
* Attempt #2:Bill Wendling2009-11-181-1/+1
| | | | | | Place the EH table in the __TEXT section on MachO. It saves space. llvm-svn: 89270
* add some missing #includesChris Lattner2009-11-071-2/+3
| | | | llvm-svn: 86367
* Pass StringRef by value.Daniel Dunbar2009-11-061-1/+1
| | | | llvm-svn: 86251
* --- Reverse-merging r82282 into '.':Bill Wendling2009-09-201-5/+0
| | | | | | | | | | | | | U lib/CodeGen/AsmPrinter/DwarfException.cpp U lib/CodeGen/AsmPrinter/DwarfException.h --- Reverse-merging r82274 into '.': U lib/Target/TargetLoweringObjectFile.cpp G lib/CodeGen/AsmPrinter/DwarfException.cpp These revisions were breaking everything. llvm-svn: 82396
* Still one more thing wrong here...Bill Wendling2009-09-201-0/+5
| | | | llvm-svn: 82356
* Here's fun! It turns out that these filter functions can be internal. If they'reBill Wendling2009-09-201-6/+0
| | | | | | | | internal, they shouldn't use the indirect pointer stuff. In the case of throw_rethrow_test, it was marked as 'internal' and calculated its own offset to its contents. llvm-svn: 82354
* Revert r82274. It's causing failures in the CINT2006 benchmarks.Bill Wendling2009-09-191-0/+6
| | | | llvm-svn: 82336
* It's inefficient to have place the exception tables (which contain the LSDA)Bill Wendling2009-09-181-2/+2
| | | | | | | | | into the __DATA section. At launch time, dyld has to update most of the section to fix up the type info pointers. It's better to place it into the __TEXT section and use pc-rel indirect pointer encodings. Similar to the personality routine. llvm-svn: 82274
* pass machinemoduleinfo down into getSymbolForDwarfGlobalReference, Chris Lattner2009-09-171-0/+2
| | | | | | currently unused. llvm-svn: 82157
* Big change #1 for personality function references:Chris Lattner2009-09-161-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | Eliminate the PersonalityPrefix/Suffix & NeedsIndirectEncoding fields from MAI: they aren't part of the asm syntax, they are related to the structure of the object file. To replace their functionality, add a new TLOF::getSymbolForDwarfGlobalReference method which asks targets to decide how to reference a global from EH in a pc-relative way. The default implementation just returns the symbol. The default darwin implementation references the symbol through an indirect $non_lazy_ptr stub. The bizarro x86-64 darwin specialization handles the weird "foo@GOTPCREL+4" hack. DwarfException.cpp now uses this to emit the reference to the symbol in the right way, and this also eliminates another horrible hack from DwarfException.cpp: - if (strcmp(MAI->getPersonalitySuffix(), "+4@GOTPCREL")) - O << "-" << MAI->getPCSymbol(); llvm-svn: 81991
* Provide proper section flags for various BSS flavoursAnton Korobeynikov2009-09-091-1/+5
| | | | llvm-svn: 81322
* Whitespace cleanupAnton Korobeynikov2009-09-091-163/+162
| | | | llvm-svn: 81321
* Simplify.Daniel Dunbar2009-08-261-3/+3
| | | | llvm-svn: 80176
* fix COFF targets (mingw/cygwin) to provide ehframe and LSDA sectionsChris Lattner2009-08-181-0/+8
| | | | llvm-svn: 79346
* Text sections should have 'exec' flag set. This seems to unbreak libstdc++ ↵Anton Korobeynikov2009-08-181-0/+3
| | | | | | | | on linux. Patch by Dmitry Gorbachev! llvm-svn: 79334
* Clear the uniquing table when initializing TLOF to avoid a crash when the ↵Benjamin Kramer2009-08-171-0/+6
| | | | | | TLOF is reinitialized with a different MCContext. llvm-svn: 79253
* Update getSectionForConstant() to to allow mergable sections to be nulled outRichard Osborne2009-08-171-3/+3
| | | | | | if not supported by the ELF subtarget. llvm-svn: 79249
* the .eh_frame sections we generate need to be writable (whichChris Lattner2009-08-151-1/+2
| | | | | | | is why they are datarel). This should fix PR4724, and is fallout from r78890. llvm-svn: 79111
* If ELF subtargets don't want to support 4/8/16-byte mergable sections, allow Chris Lattner2009-08-151-3/+3
| | | | | | them to null out the default section pointers. llvm-svn: 79078
* Make these matching rules more strict so that they don'tDan Gohman2009-08-141-3/+3
| | | | | | accidentally match unrelated things. llvm-svn: 78966
* Remove HasCrazyBSS and add a flag in TAI to indicate that '.section' Bruno Cardoso Lopes2009-08-131-2/+2
| | | | | | must be emitted for PowerPC-Linux '.bss' section llvm-svn: 78958
* Change MCSectionELF to represent a section semantically instead ofBruno Cardoso Lopes2009-08-131-58/+162
| | | | | | | syntactically as a string, very similiar to what Chris did with MachO. The parsing support and validation is not introduced yet. llvm-svn: 78890
* sink uniquing of sections out of MCContext into the ELF and PECOFF TLOF ↵Chris Lattner2009-08-131-6/+32
| | | | | | | | implementations. MCContext no longer maintains a string -> section map. llvm-svn: 78874
* add some comments: MCContext owns the MCSections, but it bump pointer allocatesChris Lattner2009-08-131-2/+0
| | | | | | them, so it doesn't have to explicitly free them. llvm-svn: 78870
* reject invalid code like:Chris Lattner2009-08-131-27/+34
| | | | | | | int x __attribute__((section("_foo, _bar"))) = 4; int y __attribute__((section("_foo, _bar, 4byte_literals"))) = 1; llvm-svn: 78867
* implement support for uniquing MachO sections.Chris Lattner2009-08-121-8/+31
| | | | llvm-svn: 78866
* reduce #includageChris Lattner2009-08-121-1/+1
| | | | llvm-svn: 78860
* Tidy #includes.Dan Gohman2009-08-111-0/+1
| | | | llvm-svn: 78677
* split MachO section handling stuff out to its out .h/.cpp file.Chris Lattner2009-08-101-1/+1
| | | | llvm-svn: 78576
* Make the big switch: Change MCSectionMachO to represent a section *semantically*Chris Lattner2009-08-101-61/+119
| | | | | | | | | | | | | | | | instead of syntactically as a string. This means that it keeps track of the segment, section, flags, etc directly and asmprints them in the right format. This also includes parsing and validation support for llvm-mc and "attribute(section)", so we should now start getting errors about invalid section attributes from the compiler instead of the assembler on darwin. Still todo: 1) Uniquing of darwin mcsections 2) Move all the Darwin stuff out to MCSectionMachO.[cpp|h] 3) there are a few FIXMEs, for example what is the syntax to get the S_GB_ZEROFILL segment type? llvm-svn: 78547
* 1. Make MCSection an abstract class.Chris Lattner2009-08-081-100/+0
| | | | | | | | | 2. Move section switch printing to MCSection virtual method which takes a TAI. This eliminates textual formatting stuff from TLOF. 3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and TLOFELF::AtIsCommentChar. llvm-svn: 78510
* make target-specific TLOF impls (except PIC16) create target-specificChris Lattner2009-08-081-3/+3
| | | | | | MCSection instances. llvm-svn: 78500
* eliminate TargetLoweringObjectFileSparc in favor of a TAI hook.Chris Lattner2009-08-081-3/+23
| | | | | | | | A TAI hook is appropriate in this case because this is just an asm syntax issue, not a semantic difference. TLOF should model the semantics of the section. llvm-svn: 78498
* now that getOrCreateSection is all object-file specific,Chris Lattner2009-08-081-138/+122
| | | | | | | give the impls an object-file-specific name. In the future they can take different arguments etc. llvm-svn: 78495
* sink getOrCreateSection down into all the object file implementations,Chris Lattner2009-08-081-8/+21
| | | | | | now that they create *all* the sections. llvm-svn: 78494
* Fix several fixmes and clean up code by sinking *all* sectionChris Lattner2009-08-061-16/+29
| | | | | | | | | | | | | | | | | creation activity into the target-specific subclasses of TLOF. Before this, globals with explicit sections could be created by the base class. 1. make getOrCreateSection protected, add a new getExplicitSectionGlobal pure virtual method to assign sections to globals with a specified section. 2. eliminate getSpecialCasedSectionGlobals, which is now PIC specific. 3. eliminate the getKindForNamedSection virtual method, which is now just a static method for ELF. 4. Add implementions of getExplicitSectionGlobal for ELF/PECOFF/Darwin/PIC16. They are now all detangled and understandable, woo! :) llvm-svn: 78319
* expose SectionKindForGlobal to curious clients, named asChris Lattner2009-08-051-9/+8
| | | | | | getKindForGlobal. llvm-svn: 78156
* enhance codegen to put 16-bit character strings into the Chris Lattner2009-08-041-17/+15
| | | | | | __TEXT,__ustring section on darwin. llvm-svn: 78068
* fix a fixme: don't create an explicit "CStringSection" for ELF,Chris Lattner2009-08-041-9/+4
| | | | | | it is just being used as a prefix, so forward substitute it directly. llvm-svn: 78067
* Add support emiting for 2/4 byte mergable strings to the ".rodata.str*"Chris Lattner2009-08-041-12/+39
| | | | | | section on ELF targets. llvm-svn: 78066
* make MergeableCString be a SectionKind "abstract class", andChris Lattner2009-08-041-13/+35
| | | | | | | | add new concrete versions for 1/2/4-byte mergable strings. These are not actually created yet. llvm-svn: 78055
* Eliminate textual section switching from the x86 backend, oneChris Lattner2009-08-031-0/+13
| | | | | | more step towards "semantics sections" llvm-svn: 78002
* move dwarf debug info section selection stuff from TAI toChris Lattner2009-08-021-0/+116
| | | | | | TLOF, unifying all the dwarf targets at the same time. llvm-svn: 77889
* convert EHFrameSection to be managed by TLOF instead of TAI.Chris Lattner2009-08-021-0/+6
| | | | llvm-svn: 77888
* move getDwarfExceptionSection from TAI to TLOF and rename it to Chris Lattner2009-08-021-0/+11
| | | | | | | | | | | getLSDASection() to be more specific. This makes it pretty obvious that the ELF LSDA section is being specified wrong in PIC mode. We're probably getting a lot of startup-time relocations to a readonly page, which is expensive and bad. Someone who cares about ELF C++ should investigate this. llvm-svn: 77847
* convert ctors/dtors section to be in TLOF instead ofChris Lattner2009-08-021-0/+24
| | | | | | TAI. llvm-svn: 77842
* (re)introduce new simpler apis for creation sectionkinds.Chris Lattner2009-08-011-56/+50
| | | | llvm-svn: 77834
* Remove "JumpTableDataSection" from TAI, instead, have AsmPrinterChris Lattner2009-08-011-7/+5
| | | | | | | | | | | | compute it based on what it knows. As part of this, rename getSectionForMergeableConstant to getSectionForConstant because it works for non-mergable constants also. The only functionality change from this is that Xcore will start dropping its jump tables into readonly section instead of data section in -static mode. This should be fine as the linker resolves the relocations. If this is a problem, let me know and we'll come up with another solution. llvm-svn: 77833
OpenPOWER on IntegriCloud