mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-19 17:33:29 +00:00
4235ba32f2
Instead, just have 3 sub-lists, one for each of {STB_LOCAL,STB_GLOBAL,STB_WEAK}. This allows us to be a lot more explicit w.r.t. the symbol ordering in the object file, because if we allowed explicitly setting the STB_* `Binding` key for the symbol, then we might have ended up having to shuffle STB_LOCAL symbols to the front of the list, which is likely to cause confusion and potential for error. Also, this new approach is simpler ;) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184506 91177308-0d34-0410-b5e6-96231b3b80d8
40 lines
871 B
YAML
40 lines
871 B
YAML
# RUN: yaml2obj -format=elf %s | llvm-readobj -symbols - | FileCheck %s
|
|
!ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_X86_64
|
|
Sections:
|
|
- Name: .data
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC, SHF_WRITE ]
|
|
Content: "DEADBEEF"
|
|
- Name: .symtab
|
|
Type: SHT_SYMTAB
|
|
Symbols:
|
|
Local:
|
|
- Name: local_symbol
|
|
Type: STT_OBJECT
|
|
Section: .data
|
|
Global:
|
|
- Name: global_symbol
|
|
Type: STT_OBJECT
|
|
Section: .data
|
|
Weak:
|
|
- Name: weak_symbol
|
|
Type: STT_OBJECT
|
|
Section: .data
|
|
|
|
# CHECK: Symbol {
|
|
# CHECK: Name: (0)
|
|
# CHECK: Symbol {
|
|
# CHECK: Name: local_symbol
|
|
# CHECK: Binding: Local
|
|
# CHECK: Symbol {
|
|
# CHECK: Name: global_symbol
|
|
# CHECK: Binding: Global
|
|
# CHECK: Symbol {
|
|
# CHECK: Name: weak_symbol
|
|
# CHECK: Binding: Weak
|