mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 14:46:53 +00:00
30b32053a4
It is possible to have .got section and one or more zero-sized section at the same address. This patch first checks that GOT (or GOT PLT) section should have non-zero size using corresponding dynamic tags. Then it looks up not empty section at the specified address. Differential Revision: http://reviews.llvm.org/D16968 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260245 91177308-0d34-0410-b5e6-96231b3b80d8
46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
# Check that llvm-readobj -mips-plt-got correctly shows .got section
|
|
# content if there are some other zero-sized sections with the same
|
|
# address as the .got. got-over.exe.elf-mips has zero-sized .data
|
|
# section at the same offset .got section.
|
|
|
|
RUN: llvm-readobj -mips-plt-got %p/Inputs/got-over.exe.elf-mips | FileCheck %s
|
|
|
|
GOT-OBJ: Cannot find PLTGOT dynamic table tag.
|
|
|
|
CHECK: Primary GOT {
|
|
CHECK-NEXT: Canonical gp value: 0x418270
|
|
CHECK-NEXT: Reserved entries [
|
|
CHECK-NEXT: Entry {
|
|
CHECK-NEXT: Address: 0x410280
|
|
CHECK-NEXT: Access: -32752
|
|
CHECK-NEXT: Initial: 0x0
|
|
CHECK-NEXT: Purpose: Lazy resolver
|
|
CHECK-NEXT: }
|
|
CHECK-NEXT: Entry {
|
|
CHECK-NEXT: Address: 0x410284
|
|
CHECK-NEXT: Access: -32748
|
|
CHECK-NEXT: Initial: 0x80000000
|
|
CHECK-NEXT: Purpose: Module pointer (GNU extension)
|
|
CHECK-NEXT: }
|
|
CHECK-NEXT: ]
|
|
CHECK-NEXT: Local entries [
|
|
CHECK-NEXT: Entry {
|
|
CHECK-NEXT: Address: 0x410288
|
|
CHECK-NEXT: Access: -32744
|
|
CHECK-NEXT: Initial: 0x4001B8
|
|
CHECK-NEXT: }
|
|
CHECK-NEXT: ]
|
|
CHECK-NEXT: Global entries [
|
|
CHECK-NEXT: Entry {
|
|
CHECK-NEXT: Address: 0x41028C
|
|
CHECK-NEXT: Access: -32740
|
|
CHECK-NEXT: Initial: 0x0
|
|
CHECK-NEXT: Value: 0x0
|
|
CHECK-NEXT: Type: None
|
|
CHECK-NEXT: Section: Undefined
|
|
CHECK-NEXT: Name: _foo
|
|
CHECK-NEXT: }
|
|
CHECK-NEXT: ]
|
|
CHECK-NEXT: Number of TLS and multi-GOT entries: 0
|
|
CHECK-NEXT: }
|