|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3 |
|
| #
b6889f0f |
| 17-Aug-2022 |
Rainer Orth <[email protected]> |
[Sparc] Don't use SunStyleELFSectionSwitchSyntax
As discussed in D85414 <https://reviews.llvm.org/D85414>, two tests currently `FAIL` on Sparc since that backend uses the Sun assembler syntax for th
[Sparc] Don't use SunStyleELFSectionSwitchSyntax
As discussed in D85414 <https://reviews.llvm.org/D85414>, two tests currently `FAIL` on Sparc since that backend uses the Sun assembler syntax for the `.section` directive, controlled by `SunStyleELFSectionSwitchSyntax`.
Instead of adapting the affected tests, this patch changes that default. The internal assembler still accepts both forms as input, only the output syntax is affected.
Current support for the Sun syntax is cursory at best: the built-in assembler cannot even assemble some of the directives emitted by GCC, and the set supported by the Solaris assembler is even larger: SPARC Assembly Language Reference Manual, 3.4 Pseudo-Op Attributes <https://docs.oracle.com/cd/E37838_01/html/E61063/gmabi.html#scrolltoc>.
A few Sparc test cases need to be adjusted. At the same time, the patch fixes the failures from D85414 <https://reviews.llvm.org/D85414>.
Tested on `sparcv9-sun-solaris2.11`.
Differential Revision: https://reviews.llvm.org/D85415
(cherry picked from commit d9993484ee40abaab6d9e96872d3a29044202aea)
show more ...
|
|
Revision tags: llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
1d2ce4da |
| 03-Jul-2022 |
Joseph Huber <[email protected]> |
[Object] Add ELF section type for offloading objects
Currently we use the `.llvm.offloading` section to store device-side objects inside the host, creating a fat binary. The contents of these sectio
[Object] Add ELF section type for offloading objects
Currently we use the `.llvm.offloading` section to store device-side objects inside the host, creating a fat binary. The contents of these sections is currently determined by the name of the section while it should ideally be determined by its type. This patch adds the new `SHT_LLVM_OFFLOADING` section type to the ELF section types. Which should make it easier to identify this specific data format.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D129052
show more ...
|
|
Revision tags: llvmorg-14.0.6 |
|
| #
adf4142f |
| 11-Jun-2022 |
Fangrui Song <[email protected]> |
[MC] De-capitalize SwitchSection. NFC
Add SwitchSection to return switchSection. The API will be removed soon.
|
|
Revision tags: llvmorg-14.0.5 |
|
| #
15d82c62 |
| 07-Jun-2022 |
Fangrui Song <[email protected]> |
[MC] De-capitalize MCStreamer functions
Follow-up to c031378ce01b8485ba0ef486654bc9393c4ac024 . The class is mostly consistent now.
|
|
Revision tags: llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
| #
365be7ac |
| 23-Feb-2022 |
Rainer Orth <[email protected]> |
[MC][ELF] Use SHF_SUNW_NODISCARD instead of SHF_GNU_RETAIN on Solaris
As requested in D107955 <https://reviews.llvm.org/D107955>, this patch splits off the `MC` and `CodeGen` parts and adds a testca
[MC][ELF] Use SHF_SUNW_NODISCARD instead of SHF_GNU_RETAIN on Solaris
As requested in D107955 <https://reviews.llvm.org/D107955>, this patch splits off the `MC` and `CodeGen` parts and adds a testcase.
Tested on `sparcv9-sun-solaris2.11`, `amd64-pc-solaris2.11`, and `x86_64-pc-linux-gnu`.
Differential Revision: https://reviews.llvm.org/D120318
show more ...
|
| #
06943537 |
| 09-Feb-2022 |
serge-sans-paille <[email protected]> |
Cleanup MCParser headers
As usual with that header cleanup series, some implicit dependencies now need to be explicit:
llvm/MC/MCParser/MCAsmParser.h no longer includes llvm/MC/MCParser/MCAsmLexer.
Cleanup MCParser headers
As usual with that header cleanup series, some implicit dependencies now need to be explicit:
llvm/MC/MCParser/MCAsmParser.h no longer includes llvm/MC/MCParser/MCAsmLexer.h
Preprocessed lines to build llvm on my setup: after: 1068185081 before: 1068324320
So no compile time benefit to expect, but we still get the looser coupling between files which is great.
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D119359
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
| #
c6bf7136 |
| 30-Dec-2021 |
Fangrui Song <[email protected]> |
[ELFAsmParser] Optimize hasPrefix with StringRef::consume_front
|
| #
c01c62c7 |
| 30-Nov-2021 |
Tobias Burnus <[email protected]> |
[MC][ELF] Fix accepting abbreviated form with Type change
Follow up to D92052 and D94072, exposed due to D107707
Many assemblers to permit that only the first .section contains all the attributes l
[MC][ELF] Fix accepting abbreviated form with Type change
Follow up to D92052 and D94072, exposed due to D107707
Many assemblers to permit that only the first .section contains all the attributes like '.lds_bss,"w",@nobits' and later section only use the name ('.lds_bss') inheriting those attributes from the first section. I turned out that the case that Type changed was missed when implementing it - and D107707 make it much more likely to hit that issue. That's fixed by this commit.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D114717
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1 |
|
| #
d14d7068 |
| 23-Oct-2021 |
Kazu Hirata <[email protected]> |
[llvm] Use StringRef::contains (NFC)
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2 |
|
| #
990e8025 |
| 08-Aug-2021 |
Simon Atanasyan <[email protected]> |
[MC][ELF] Do not error on parsing .debug_* section directive for MIPS
MIPS .debug_* sections should have SHT_MIPS_DWARF section type to distinguish among sections contain DWARF and ECOFF debug forma
[MC][ELF] Do not error on parsing .debug_* section directive for MIPS
MIPS .debug_* sections should have SHT_MIPS_DWARF section type to distinguish among sections contain DWARF and ECOFF debug formats, but in assembly files these sections have SHT_PROGBITS (@progbits) type. Now assembler shows 'changed section type for ...' error when parsing `.section .debug_*,"",@progbits` directive for MIPS targets.
The same problem exists for x86-64 target and this patch extends workaround implemented in D76151. The patch adds one more case when assembler ignores section types mismatch after `SwitchSection()` call.
Differential Revision: https://reviews.llvm.org/D107707
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4 |
|
| #
b4a8c0eb |
| 18-Mar-2021 |
Yuanfang Chen <[email protected]> |
[LTO][MC] Discard non-prevailing defined symbols in module-level assembly
This is the alternative approach to D96931.
In LTO, for each module with inlineasm block, prepend directive ".lto_discard <
[LTO][MC] Discard non-prevailing defined symbols in module-level assembly
This is the alternative approach to D96931.
In LTO, for each module with inlineasm block, prepend directive ".lto_discard <sym>, <sym>*" to the beginning of the inline asm. ".lto_discard" is both a module inlineasm block marker and (optionally) provides a list of symbols to be discarded.
In MC while emitting for inlineasm, discard symbol binding & symbol definitions according to ".lto_disard".
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D98762
show more ...
|
|
Revision tags: llvmorg-12.0.0-rc3 |
|
| #
d96af2ed |
| 06-Mar-2021 |
Fangrui Song <[email protected]> |
[MC] Support .symver *, *, remove
As a resolution to https://sourceware.org/bugzilla/show_bug.cgi?id=25295 , GNU as from binutils 2.35 supports the optional third argument for the .symver directive.
[MC] Support .symver *, *, remove
As a resolution to https://sourceware.org/bugzilla/show_bug.cgi?id=25295 , GNU as from binutils 2.35 supports the optional third argument for the .symver directive.
'remove' for a non-default version is useful: `.symver def_v1, def@v1, remove` => def_v1 is not retained in the symbol table. Previously the user has to strip the original symbol or specify a `local:` version node in a version script to localize the symbol.
`.symver def, def@@v1, remove` and `.symver def, def@@@v1, remove` are supported as well, though they are identical to `.symver def, def@@@v1`.
local/hidden are not useful so this patch does not implement them.
show more ...
|
|
Revision tags: llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3 |
|
| #
16af9739 |
| 01-Feb-2021 |
Petr Hosek <[email protected]> |
[MC][ELF] Support for zero flag section groups
This change introduces support for zero flag ELF section groups to LLVM. LLVM already supports COMDAT sections, which in ELF are a special type of ELF
[MC][ELF] Support for zero flag section groups
This change introduces support for zero flag ELF section groups to LLVM. LLVM already supports COMDAT sections, which in ELF are a special type of ELF section groups. These are generally useful to enable linker GC where you want a group of sections to always travel together, that is to be either retained or discarded as a whole, but without the COMDAT semantics. Other ELF assemblers already support zero flag ELF section groups and this change helps us reach feature parity.
Differential Revision: https://reviews.llvm.org/D95851
show more ...
|
| #
1477ed84 |
| 02-Feb-2021 |
Fangrui Song <[email protected]> |
[MC] Support SHF_GNU_RETAIN as section flag 'R'
On Linux target triples, GNU as sets EI_OSABI to ELFOSABI_GNU when SHF_GNU_RETAIN is used。 On `*-*-freebsd`, it usually sets EI_OSABI to ELFOSABI_FREE
[MC] Support SHF_GNU_RETAIN as section flag 'R'
On Linux target triples, GNU as sets EI_OSABI to ELFOSABI_GNU when SHF_GNU_RETAIN is used。 On `*-*-freebsd`, it usually sets EI_OSABI to ELFOSABI_FREEBSD.
GNU ld respects SHF_GNU_RETAIN only for ELFOSABI_FREEBSD/ELFOSABI_GNU. https://sourceware.org/bugzilla/show_bug.cgi?id=27282
MC doesn't set ELFOSABI_GNU for SHF_GNU_RETAIN/STB_GNU_UNIQUE/STT_GNU_IFUNC. MC assembled object files do not have special semantics in GNU ld.
Reviewed By: psmith
Differential Revision: https://reviews.llvm.org/D95730
show more ...
|
| #
70ea15b8 |
| 28-Jan-2021 |
Tobias Burnus <[email protected]> |
[MC][ELF] Fix accepting abbreviated form with sh_flags and sh_entsize
Followup to D92052 as I missed an issue as shown via GCC bug https://gcc.gnu.org/PR97827, namely: (e.g.) ".rodata." implies ELF:
[MC][ELF] Fix accepting abbreviated form with sh_flags and sh_entsize
Followup to D92052 as I missed an issue as shown via GCC bug https://gcc.gnu.org/PR97827, namely: (e.g.) ".rodata." implies ELF::SHF_ALLOC.
Crossref:
- D73999 / commit 75af9da755721123e62b45cd0bc0c5e688a9722a added for LLVM 11 a check that sh_flags and sh_entsize (and sh_type) changes are an error, in line with GNU assembler.
- D92052 / commit 1deff4009e0ae661b03682901bf6932297ce7ea1 permitted the abbreviated form which many assemblers accept and GCC generates: while the first .section contains the flags and entsize, subsequent sections simply contain the name without repeating entsize or flags.
However, the latter patch missed in the check that some flags are automatically set, e.g. '.rodata." implies ELF::SHF_ALLOC.
Related https://bugs.llvm.org/show_bug.cgi?id=48201
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D94072
show more ...
|
|
Revision tags: llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
| #
1deff400 |
| 11-Dec-2020 |
Tobias Burnus <[email protected]> |
[MC][ELF] Accept abbreviated form with sh_flags and sh_entsize
D73999 / commit 75af9da755721123e62b45cd0bc0c5e688a9722a added for LLVM 11 a check that sh_flags and sh_entsize (and sh_type) changes a
[MC][ELF] Accept abbreviated form with sh_flags and sh_entsize
D73999 / commit 75af9da755721123e62b45cd0bc0c5e688a9722a added for LLVM 11 a check that sh_flags and sh_entsize (and sh_type) changes are an error, in line with GNU assembler.
However, GNU assembler accepts and GCC generates an abbreviated form: while the first .section contains the flags and entsize, subsequent sections simply contain the name without repeating entsize or flags.
Do likewise for better compatibility.
See https://bugs.llvm.org/show_bug.cgi?id=48201
Reviewed By: jhenderson, MaskRay
Differential Revision: https://reviews.llvm.org/D92052
show more ...
|
|
Revision tags: llvmorg-11.0.1-rc1 |
|
| #
fac0622a |
| 17-Nov-2020 |
Fangrui Song <[email protected]> |
ELFAsmParser: Remove non-SHF_ALLOC or non-executable sections' line info/address ranges contribution for -g
I filed the issue https://sourceware.org/bugzilla/show_bug.cgi?id=26850 , which was acknow
ELFAsmParser: Remove non-SHF_ALLOC or non-executable sections' line info/address ranges contribution for -g
I filed the issue https://sourceware.org/bugzilla/show_bug.cgi?id=26850 , which was acknowledged and fixed in GNU binutils 2.36
This patch adds the similar behavior to MC.
Reviewed By: #debug-info, dblaikie
Differential Revision: https://reviews.llvm.org/D91505
show more ...
|
| #
395c8bed |
| 02-Nov-2020 |
Fangrui Song <[email protected]> |
[MC] Make MCStreamer aware of AsmParser's StartTokLoc
A SMLoc allows MCStreamer to report location-aware diagnostics, which were previously done by adding SMLoc to various methods (e.g. emit*) in an
[MC] Make MCStreamer aware of AsmParser's StartTokLoc
A SMLoc allows MCStreamer to report location-aware diagnostics, which were previously done by adding SMLoc to various methods (e.g. emit*) in an ad-hoc way.
Since the file:line is most important, the column is less important and the start token location suffices in many cases, this patch reverts b7e7131af2dd7bdb03fa42a3bc1b4bc72ab95ce1
``` // old symbol-binding-changed.s:6:8: error: local changed binding to STB_GLOBAL .globl local ^ // new symbol-binding-changed.s:6:1: error: local changed binding to STB_GLOBAL .globl local ^ ```
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D90511
show more ...
|
| #
b7e7131a |
| 30-Oct-2020 |
Fangrui Song <[email protected]> |
[MC] Add SMLoc to MCStreamer::emitSymbolAttribute and report changed binding warnings/errors for ELF
|
| #
2b0c5d76 |
| 08-Oct-2020 |
Rahman Lavaee <[email protected]> |
Introduce and use a new section type for the bb_addr_map section.
This patch lets the bb_addr_map (renamed to __llvm_bb_addr_map) section use a special section type (SHT_LLVM_BB_ADDR_MAP) instead of
Introduce and use a new section type for the bb_addr_map section.
This patch lets the bb_addr_map (renamed to __llvm_bb_addr_map) section use a special section type (SHT_LLVM_BB_ADDR_MAP) instead of SHT_PROGBITS. This would help parsers, dumpers and other tools to use the sh_type ELF field to identify this section rather than relying on string comparison on the section name.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D88199
show more ...
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2 |
|
| #
11bb7c22 |
| 03-Aug-2020 |
Fangrui Song <[email protected]> |
[MC] Set sh_link to 0 if the associated symbol is undefined
Part of https://bugs.llvm.org/show_bug.cgi?id=41734
LTO can drop externally available definitions. Such AssociatedSymbol is not associate
[MC] Set sh_link to 0 if the associated symbol is undefined
Part of https://bugs.llvm.org/show_bug.cgi?id=41734
LTO can drop externally available definitions. Such AssociatedSymbol is not associated with a symbol. ELFWriter::writeSection() will assert.
Allow a SHF_LINK_ORDER section to have sh_link=0.
We need to give sh_link a syntax, a literal zero in the linked-to symbol position, e.g. `.section name,"ao",@progbits,0`
Reviewed By: pcc
Differential Revision: https://reviews.llvm.org/D72899
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
| #
0f0c5af3 |
| 26-Jun-2020 |
Zequan Wu <[email protected]> |
[COFF] Add cg_profile directive and .llvm.call-graph-profile section
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83597
|
|
Revision tags: llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5 |
|
| #
bf60953f |
| 13-Mar-2020 |
Fangrui Song <[email protected]> |
[MC][X86] Allow SHT_PROGBITS for .eh_frame on x86-64
GNU as emits SHT_PROGBITS .eh_frame by default for .cfi_* directives. We follow x86-64 psABI and use SHT_X86_64_UNWIND for .eh_frame
Don't error
[MC][X86] Allow SHT_PROGBITS for .eh_frame on x86-64
GNU as emits SHT_PROGBITS .eh_frame by default for .cfi_* directives. We follow x86-64 psABI and use SHT_X86_64_UNWIND for .eh_frame
Don't error for SHT_PROGBITS .eh_frame on x86-64. This keeps compatibility with `.section .eh_frame,"a",@progbits` in existing assembly files.
See https://groups.google.com/d/msg/x86-64-abi/7sr4E6THl3g/zUU2UPHOAQAJ for more discussions.
Reviewed By: joerg
Differential Revision: https://reviews.llvm.org/D76151
show more ...
|
|
Revision tags: llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
| #
692e0c96 |
| 29-Feb-2020 |
Fangrui Song <[email protected]> |
[MC] Add MCStreamer::emitInt{8,16,32,64}
Similar to AsmPrinter::emitInt{8,16,32,64}.
|
|
Revision tags: llvmorg-10.0.0-rc2 |
|
| #
75af9da7 |
| 04-Feb-2020 |
Fangrui Song <[email protected]> |
[MC][ELF] Error for sh_type, sh_flags or sh_entsize change
Heads-up message: https://lists.llvm.org/pipermail/llvm-dev/2020-February/139390.html
GNU as started to emit warnings for changed sh_type
[MC][ELF] Error for sh_type, sh_flags or sh_entsize change
Heads-up message: https://lists.llvm.org/pipermail/llvm-dev/2020-February/139390.html
GNU as started to emit warnings for changed sh_type or sh_flags in 2000. GNU as>=2.35 will emit errors for most sh_type/sh_flags change, and error for entsize change.
Some cases remain warnings for legacy reasons:
.section .init_array,"ax", @progbits .section .init_array,"ax", @init_array # And some obscure sh_flags changes (OS/Processor specific flags)
The rationale of a diagnostic (warning or error) is that sh_type, sh_flags or sh_entsize changes usually indicate user errors. The values are taken from the first .section directive. Successive directives are ignored.
We just try to be rigid and emit errors for all sh_type/sh_flags/sh_entsize change.
A possible improvement in the future is to reuse llvm-readobj/ELFDumper.cpp:getSectionTypeString so that we can name the type in the diagnostics.
Reviewed By: psmith
Differential Revision: https://reviews.llvm.org/D73999
show more ...
|