llvm-project/lld/test/ELF/invalid
Fangrui Song b216c80cc2 [ELF] Allow SHF_LINK_ORDER sections to have sh_link=0
Part of https://bugs.llvm.org/show_bug.cgi?id=41734

The semantics of SHF_LINK_ORDER have been extended to represent metadata
sections associated with some other sections (usually text).

The associated text section may be discarded (e.g. LTO) and we want the
metadata section to have sh_link=0 (D72899, D76802).

Normally the metadata section is only referenced by the associated text
section. sh_link=0 means the associated text section is discarded, and
the metadata section will be garbage collected. If there is another
section (.gc_root) referencing the metadata section, the metadata
section will be retained. It's the .gc_root consumer's job to validate
the metadata sections.

  # This creates a SHF_LINK_ORDER .meta with sh_link=0
  .section .meta,"awo",@progbits,0
  1:
  .section .meta,"awo",@progbits,foo
  2:

  .section .gc_root,"a",@progbits
  .quad 1b
  .quad 2b

Reviewed By: pcc, jhenderson

Differential Revision: https://reviews.llvm.org/D72904
2020-08-05 16:17:42 -07:00
..
bad-arm-attributes.s [ARM] Rewrite ARMAttributeParser 2020-03-05 10:57:27 -08:00
bad-reloc-target.test [lib/ObjectYAML] - Make `ELFYAML::Relocation::Offset` optional. 2020-03-06 13:59:58 +03:00
broken-relaxation-x64.test [lld] NFC: fix trivial typos in comments 2020-04-02 01:21:36 +09:00
comdat-broken.test [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
common-symbol-alignment.test [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
data-encoding.test
dynamic-section-broken.test [test] yaml2obj -docnum => --docnum= 2020-02-05 10:25:04 -08:00
eh-frame-hdr-no-out.s [ELF][test] Fix section sh_type and sh_flags 2020-02-19 22:01:42 -08:00
ehframe-broken-relocation.test
entsize.yaml [ELF] Allow invalid sh_size%sh_entsize!=0 for non-SHF_MERGE sections 2020-04-03 08:48:30 -07:00
executable.s
invalid-binding.test [LLD][ELF] - Remove binding.elf binary from test case. NFCI. 2019-04-24 12:16:39 +00:00
invalid-debug-relocations.test [ELF] Enforce two dashes for Flag options not supported by GNU ld (i.e. no compatibility burden) 2020-05-15 11:07:25 -07:00
invalid-e_shnum.test [LLD][ELF] - Update test after yaml2obj change. NFC. 2020-07-15 13:00:48 +03:00
invalid-elf.test [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
invalid-file-class.test [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
invalid-relocation-aarch64.test [lib/ObjectYAML] - Make `ELFYAML::Relocation::Offset` optional. 2020-03-06 13:59:58 +03:00
invalid-relocation-x64.test [lib/ObjectYAML] - Make `ELFYAML::Relocation::Offset` optional. 2020-03-06 13:59:58 +03:00
invalid-soname.test [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
linkorder-invalid-sec.test [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
merge-invalid-size.s Improve error message for bad SHF_MERGE sections 2019-10-10 08:32:12 +00:00
merge-writable.s Improve error message for bad SHF_MERGE sections 2019-10-10 08:32:12 +00:00
merge-zero-size.test
mips-invalid-options-descriptor.test [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
multiple-relocations-sections.test [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
non-terminated-string.test [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
section-alignment.test [LLD][ELF] - Fix section-alignment.test after yaml2obj change. 2020-05-15 12:00:37 +03:00
section-alignment2.s [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
section-index.test [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
sht-group-wrong-section.test [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
sht-group.test [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
symbol-name.test [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
symtab-sh-info-dup.test [ELF] Refactor ObjFile<ELFT>::initializeSymbols to enforce the invariant: InputFile::symbols has non null entry 2020-06-19 09:05:37 -07:00
symtab-sh-info.s [ELF] Refactor ObjFile<ELFT>::initializeSymbols to enforce the invariant: InputFile::symbols has non null entry 2020-06-19 09:05:37 -07:00
symtab-symbols.test
tls-symbol.s
undefined-local-symbol-in-dso.test [LLD][ELF] - Fix test case after r363401 2019-06-14 14:26:34 +00:00
verdef-no-symtab.test [ELF][test] Change -o %t to -o /dev/null if the output is not needed 2020-02-12 21:54:50 -08:00
verneed-shared.test [ELF] Allow misaligned SHT_GNU_verneed 2020-05-26 11:18:19 -07:00
x86-64-tlsdesc-gd.s [ELF] Implement General Dynamic style TLSDESC for x86-64 2019-05-29 02:03:56 +00:00