aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCSectionELF.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-11-06Bring r252305 back with a test fix.Rafael Espindola1-0/+2
We now create the .eh_frame section early, just like every other special section. This means that the special flags are visible in code that explicitly asks for ".eh_frame". llvm-svn: 252313
2015-09-25MCAsmInfo: Allow targets to specify when the .section directive should be ↵Tom Stellard1-6/+1
omitted Summary: The default behavior is to omit the .section directive for .text, .data, and sometimes .bss, but some targets may want to omit this directive for other sections too. The AMDGPU backend will uses this to emit a simplified syntax for section switches. For example if the section directive is not omitted (current behavior), section switches to .hsatext will be printed like this: .section .hsatext,#alloc,#execinstr,#write This is actually wrong, because .hsatext has some custom STT_* flags, which MC doesn't know how to print or parse. If the section directive is omitted (made possible by this commit), section switches will be printed like this: .hsatext The motivation for this patch is to make it possible to emit sections with custom STT_* flags without having to teach MC about all the target specific STT_* flags. Reviewers: rafael, grosbach Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12423 llvm-svn: 248618
2015-06-09MC: Add target hook to control symbol quotingMatt Arsenault1-4/+9
llvm-svn: 239370
2015-04-06Use a comma after the unique keyword.Rafael Espindola1-1/+1
H.J. Lu noted that all .section options are separated by a comma. This patch changes the syntax of unique to require one. llvm-svn: 234174
2015-04-04Implement unique sections with an unique ID.Rafael Espindola1-3/+3
This allows the compiler/assembly programmer to switch back to a section. This in turn fixes the bootstrap failure on powerpc (tested on gcc110) without changing the ppc codegen at all. I will try to cleanup the various getELFSection overloads in a followup patch. Just using a default argument now would lead to ambiguities. llvm-svn: 234099
2015-02-17Add r228980 back.Rafael Espindola1-0/+7
Add support for having multiple sections with the same name and comdat. Using this in combination with -ffunction-sections allows LLVM to output a .o file with mulitple sections named .text. This saves space by avoiding long unique names of the form .text.<C++ mangled name>. llvm-svn: 229541
2015-02-13Revert a series of commits starting at r228886 which is triggering someChandler Carruth1-7/+0
regressions for LLDB on Linux. Rafael indicated on lldb-dev that we should just go ahead and revert these but that he wasn't at a computer. The patches backed out are as follows: r228980: Add support for having multiple sections with the name and ... r228889: Invert the section relocation map. r228888: Use the existing SymbolTableIndex intsead of doing a lookup. r228886: Create the Section -> Rel Section map when it is first needed. These patches look pretty nice to me, so hoping its not too hard to get them re-instated. =D llvm-svn: 229080
2015-02-12Add support for having multiple sections with the same name and comdat.Rafael Espindola1-0/+7
Using this in combination with -ffunction-sections allows LLVM to output a .o file with mulitple sections named .text. This saves space by avoiding long unique names of the form .text.<C++ mangled name>. llvm-svn: 228980
2015-01-29Compute the ELF SectionKind from the flags.Rafael Espindola1-10/+0
Any code creating an MCSectionELF knows ELF and already provides the flags. SectionKind is an abstraction used by common code that uses a plain MCSection. Use the flags to compute the SectionKind. This removes a lot of guessing and boilerplate from the MCSectionELF construction. llvm-svn: 227476
2014-10-09delete function name from commentSanjay Patel1-2/+2
llvm-svn: 219443
2013-11-13Remove AllowQuotesInName and friends from MCAsmInfo.Rafael Espindola1-23/+30
Accepting quotes is a property of an assembler, not of an object file. For example, ELF can support any names for sections and symbols, but the gnu assembler only accepts quotes in some contexts and llvm-mc in a few more. LLVM should not produce different symbols based on a guess about which assembler will be reading the code it is printing. llvm-svn: 194575
2013-09-15ELF: Add support for the exclude section bit for gas compat.Benjamin Kramer1-0/+4
llvm-svn: 190769
2013-04-17Add support for subsections to the ELF assembler. Fixes PR8717.Peter Collingbourne1-2/+10
Differential Revision: http://llvm-reviews.chandlerc.com/D598 llvm-svn: 179725
2012-05-11Tidy up. Trailing whitespace.Jim Grosbach1-6/+6
llvm-svn: 156602
2011-03-04Be nice to Xcore and the XMOS assembler and avoid quoting section namesJoerg Sonnenberger1-12/+18
that contain only letters, digits and the characters "_" and ".". llvm-svn: 127028
2011-03-03Bug#9033: For the ELF assembler output, always quote the section name.Joerg Sonnenberger1-2/+16
llvm-svn: 126963
2011-02-14Switch llvm to using comdats. For now always use groups with a singleRafael Espindola1-0/+4
section. llvm-svn: 125526
2011-02-14Move broken HasCommonSymbols to ELFWriter.cpp.Rafael Espindola1-11/+0
llvm-svn: 125490
2011-01-23Remove more duplicated code.Rafael Espindola1-15/+15
llvm-svn: 124056
2011-01-23Remove duplicated code.Rafael Espindola1-7/+9
llvm-svn: 124054
2010-12-26Add support for @note. Patch by Jörg Sonnenberger.Rafael Espindola1-0/+2
llvm-svn: 122568
2010-11-17make isVirtualSection a virtual method on MCSection. Chris' suggestion.Rafael Espindola1-0/+4
llvm-svn: 119547
2010-11-09Fixed version of 118639 with an extra assert to catch similar problemsRafael Espindola1-32/+23
earlier. Implicit bool -> int conversions are evil! llvm-svn: 118651
2010-11-09Revert previous patch. Missed a case.Rafael Espindola1-22/+32
llvm-svn: 118645
2010-11-09Remove IsExplicit. It was always false.Rafael Espindola1-32/+22
llvm-svn: 118639
2010-10-04Add hook in MCSection to decide when to use "optimized nops", for eachJan Wen Voung1-0/+4
section kind. Previously, optimized nops were only used for MachO. Also added tests for ELF and COFF. llvm-svn: 115523
2010-09-30Move logic of determining ELF entsize from the .s printer to initializationJan Wen Voung1-12/+11
time. That way, the EntrySize field is initialized for other code paths, namely, the .ll -> .o code path. llvm-svn: 115141
2010-04-08move elf section uniquing to MCContext. Along the wayChris Lattner1-57/+57
merge XCore's section into MCSectionELF llvm-svn: 100812
2010-01-22Simplify some uses of str(n)cmp with StringRef.Benjamin Kramer1-7/+5
llvm-svn: 94189
2010-01-13tidyChris Lattner1-4/+3
llvm-svn: 93352
2009-11-06Pass StringRef by value.Daniel Dunbar1-1/+1
llvm-svn: 86251
2009-08-22rename TAI -> MAI, being careful not to make MAILJMP instructions :)Chris Lattner1-7/+7
llvm-svn: 79777
2009-08-22Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner1-3/+3
llvm-svn: 79763
2009-08-15add support for target-specific ELF section flags, add a new MCSectionXCoreChris Lattner1-4/+6
class which represents the XCore cp/dp section flags. No functionality change yet. llvm-svn: 79077
2009-08-14*try* to use a better name to describe how common symbols are marked on the ↵Bruno Cardoso Lopes1-2/+4
elf object file. llvm-svn: 79029
2009-08-13Fix MCSectionELF::ShouldOmitSectionDirective's matching of .data andDan Gohman1-3/+3
friends so that it doesn't match sections like .data.rel.local, which should not be emitted as section directives. llvm-svn: 78963
2009-08-13Remove HasCrazyBSS and add a flag in TAI to indicate that '.section' Bruno Cardoso Lopes1-9/+10
must be emitted for PowerPC-Linux '.bss' section llvm-svn: 78958
2009-08-13Add a method to return if the ELF section contains only common symbols!Bruno Cardoso Lopes1-0/+10
llvm-svn: 78937
2009-08-13Change MCSectionELF to represent a section semantically instead ofBruno Cardoso Lopes1-0/+123
syntactically as a string, very similiar to what Chris did with MachO. The parsing support and validation is not introduced yet. llvm-svn: 78890