mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-26 09:18:56 +00:00
[yaml2obj][ELF] Make symbol table top-level key.
Although in reality the symbol table in ELF resides in a section, the standard requires that there be no more than one SHT_SYMTAB. To enforce this constraint, it is cleaner to group all the symbols under a top-level `Symbols` key on the object file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -10,21 +10,19 @@ Sections:
|
||||
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
|
||||
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)
|
||||
|
@@ -16,16 +16,14 @@ Sections:
|
||||
# This YAML file is a valid relocatable object that,
|
||||
# when linked and run on x86_64, will go into an
|
||||
# infloop.
|
||||
- Name: .symtab
|
||||
Type: SHT_SYMTAB
|
||||
Symbols:
|
||||
Global:
|
||||
- Name: main
|
||||
Type: STT_FUNC
|
||||
Section: .text
|
||||
Value: 0x1
|
||||
Size: 2
|
||||
- Name: undefined_symbol
|
||||
Symbols:
|
||||
Global:
|
||||
- Name: main
|
||||
Type: STT_FUNC
|
||||
Section: .text
|
||||
Value: 0x1
|
||||
Size: 2
|
||||
- Name: undefined_symbol
|
||||
|
||||
# CHECK: Symbols [
|
||||
# CHECK-NEXT: Symbol {
|
||||
|
Reference in New Issue
Block a user