[ELF] Add test so that _end value is set appropriately for NMAGIC/OMAGIC executables(Fix comment from espindola)

llvm-svn: 184060
This commit is contained in:
Shankar Easwaran 2013-06-16 15:06:18 +00:00
parent e9d5fb09a3
commit a97f12e00a
1 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,81 @@
# This tests verifies that the value of _end symbol is point to the right value
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/nmagic.o \
RUN: --noinhibit-exec -o %t --nmagic
RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=NMAGICABSSYMBOLS %s
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/nmagic.o \
RUN: --noinhibit-exec -o %t --omagic
RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=OMAGICABSSYMBOLS %s
NMAGICABSSYMBOLS: Symbol {
NMAGICABSSYMBOLS: Name: __bss_start (51)
NMAGICABSSYMBOLS: Value: 0x40100C
NMAGICABSSYMBOLS: Size: 0
NMAGICABSSYMBOLS: Binding: Global (0x1)
NMAGICABSSYMBOLS: Type: Object (0x1)
NMAGICABSSYMBOLS: Other: 0
NMAGICABSSYMBOLS: Section: (0xFFF1)
NMAGICABSSYMBOLS: }
NMAGICABSSYMBOLS: Symbol {
NMAGICABSSYMBOLS: Name: __bss_end (63)
NMAGICABSSYMBOLS: Value: 0x40100C
NMAGICABSSYMBOLS: Size: 0
NMAGICABSSYMBOLS: Binding: Global (0x1)
NMAGICABSSYMBOLS: Type: Object (0x1)
NMAGICABSSYMBOLS: Other: 0
NMAGICABSSYMBOLS: Section: (0xFFF1)
NMAGICABSSYMBOLS: }
NMAGICABSSYMBOLS: Symbol {
NMAGICABSSYMBOLS: Name: _end (73)
NMAGICABSSYMBOLS: Value: 0x40100C
NMAGICABSSYMBOLS: Size: 0
NMAGICABSSYMBOLS: Binding: Global (0x1)
NMAGICABSSYMBOLS: Type: Object (0x1)
NMAGICABSSYMBOLS: Other: 0
NMAGICABSSYMBOLS: Section: (0xFFF1)
NMAGICABSSYMBOLS: }
NMAGICABSSYMBOLS: Symbol {
NMAGICABSSYMBOLS: Name: end (78)
NMAGICABSSYMBOLS: Value: 0x40100C
NMAGICABSSYMBOLS: Size: 0
NMAGICABSSYMBOLS: Binding: Global (0x1)
NMAGICABSSYMBOLS: Type: Object (0x1)
NMAGICABSSYMBOLS: Other: 0
NMAGICABSSYMBOLS: Section: (0xFFF1)
NMAGICABSSYMBOLS: }
OMAGICABSSYMBOLS: Symbol {
OMAGICABSSYMBOLS: Name: __bss_start (51)
OMAGICABSSYMBOLS: Value: 0x40012C
OMAGICABSSYMBOLS: Size: 0
OMAGICABSSYMBOLS: Binding: Global (0x1)
OMAGICABSSYMBOLS: Type: Object (0x1)
OMAGICABSSYMBOLS: Other: 0
OMAGICABSSYMBOLS: Section: (0xFFF1)
OMAGICABSSYMBOLS: }
OMAGICABSSYMBOLS: Symbol {
OMAGICABSSYMBOLS: Name: __bss_end (63)
OMAGICABSSYMBOLS: Value: 0x40012C
OMAGICABSSYMBOLS: Size: 0
OMAGICABSSYMBOLS: Binding: Global (0x1)
OMAGICABSSYMBOLS: Type: Object (0x1)
OMAGICABSSYMBOLS: Other: 0
OMAGICABSSYMBOLS: Section: (0xFFF1)
OMAGICABSSYMBOLS: }
OMAGICABSSYMBOLS: Symbol {
OMAGICABSSYMBOLS: Name: _end (73)
OMAGICABSSYMBOLS: Value: 0x40012C
OMAGICABSSYMBOLS: Size: 0
OMAGICABSSYMBOLS: Binding: Global (0x1)
OMAGICABSSYMBOLS: Type: Object (0x1)
OMAGICABSSYMBOLS: Other: 0
OMAGICABSSYMBOLS: Section: (0xFFF1)
OMAGICABSSYMBOLS: }
OMAGICABSSYMBOLS: Symbol {
OMAGICABSSYMBOLS: Name: end (78)
OMAGICABSSYMBOLS: Value: 0x40012C
OMAGICABSSYMBOLS: Size: 0
OMAGICABSSYMBOLS: Binding: Global (0x1)
OMAGICABSSYMBOLS: Type: Object (0x1)
OMAGICABSSYMBOLS: Other: 0
OMAGICABSSYMBOLS: Section: (0xFFF1)
OMAGICABSSYMBOLS: }