2013-01-28 12:15:44 +08:00
|
|
|
# Tests entry point handling
|
|
|
|
#
|
|
|
|
# Test generated using the source file below:
|
|
|
|
#
|
|
|
|
# int main()
|
|
|
|
# {
|
|
|
|
# return 0;
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
|
2013-11-02 11:50:03 +08:00
|
|
|
# RUN: lld -flavor gnu -target x86_64 %s -e _entrypoint --noinhibit-exec -o %t1
|
2013-01-28 12:15:44 +08:00
|
|
|
# RUN: llvm-nm -n %t1 | FileCheck %s
|
2014-01-27 11:09:26 +08:00
|
|
|
#
|
2013-10-30 08:02:04 +08:00
|
|
|
# CHECK: 004001e0 T main
|
2014-11-10 22:55:07 +08:00
|
|
|
# CHECK: 00401000 D _DYNAMIC
|
2014-11-10 22:55:11 +08:00
|
|
|
# CHECK: 00401060 A _end
|
|
|
|
# CHECK: 00401060 A end
|
2013-04-01 23:12:54 +08:00
|
|
|
# CHECK: U _entrypoint
|
2013-01-28 12:15:44 +08:00
|
|
|
|
2014-01-27 11:09:26 +08:00
|
|
|
defined-atoms:
|
2013-01-28 12:15:44 +08:00
|
|
|
- name: .text
|
|
|
|
alignment: 2^4
|
|
|
|
section-choice: custom-required
|
|
|
|
section-name: .text
|
|
|
|
- name: main
|
|
|
|
scope: global
|
2014-01-27 11:09:26 +08:00
|
|
|
content: [ B8, 00, 00, 00, 00, C7, 44, 24, FC, 00, 00, 00,
|
2013-01-28 12:15:44 +08:00
|
|
|
00, C3 ]
|
|
|
|
alignment: 2^4
|
|
|
|
section-choice: custom-required
|
|
|
|
section-name: .text
|
|
|
|
- name: .data
|
|
|
|
type: data
|
|
|
|
alignment: 2^2
|
|
|
|
section-choice: custom-required
|
|
|
|
section-name: .data
|
|
|
|
- name: .bss
|
|
|
|
type: zero-fill
|
|
|
|
alignment: 2^2
|
|
|
|
section-choice: custom-required
|
|
|
|
section-name: .bss
|
|
|
|
- name: .note.GNU-stack
|
|
|
|
section-choice: custom-required
|
|
|
|
section-name: .note.GNU-stack
|
|
|
|
permissions: r--
|
|
|
|
- name: .eh_frame
|
2014-01-27 11:09:26 +08:00
|
|
|
content: [ 14, 00, 00, 00, 00, 00, 00, 00, 01, 7A, 52, 00,
|
|
|
|
01, 78, 10, 01, 1B, 0C, 07, 08, 90, 01, 00, 00,
|
|
|
|
14, 00, 00, 00, 1C, 00, 00, 00, 00, 00, 00, 00,
|
2013-01-28 12:15:44 +08:00
|
|
|
0E, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 ]
|
|
|
|
alignment: 2^3
|
|
|
|
section-choice: custom-required
|
|
|
|
section-name: .eh_frame
|
|
|
|
permissions: r--
|
2014-01-27 11:09:26 +08:00
|
|
|
references:
|
2013-04-05 02:59:24 +08:00
|
|
|
- kind: R_X86_64_PC32
|
2013-01-28 12:15:44 +08:00
|
|
|
offset: 32
|
|
|
|
target: .text
|