Files
clang-p2996/lld/test/pass-got-basic.objtxt
Nick Kledzik c314b46e71 This is my Driver refactoring patch.
The major changes are:
1) LinkerOptions has been merged into TargetInfo
2) LinkerInvocation has been merged into Driver
3) Drivers no longer convert arguments into an intermediate (core) argument 
   list, but instead create a TargetInfo object and call setter methods on 
   it. This is only how in-process linking would work. That is, you can 
   programmatically set up a TargetInfo object which controls the linking.
4) Lots of tweaks to test suite to work with driver changes
5) Add the DarwinDriver
6) I heavily doxygen commented TargetInfo.h

Things to do after this patch is committed:
a) Consider renaming TargetInfo, given its new roll. 
b) Consider pulling the list of input files out of TargetInfo. This will 
   enable in-process clients to create one TargetInfo the re-use it with 
   different input file lists.
c) Work out a way for Drivers to format the warnings and error done in 
   core linking.

llvm-svn: 178776
2013-04-04 18:59:24 +00:00

83 lines
2.5 KiB
Plaintext

# RUN: lld -core %s --add-pass GOT | FileCheck %s
#
# Test that GOT pass instantiates GOT entires and alters references
#
---
defined-atoms:
- name: foo
type: code
content: [ 48, 8B, 0D, 00, 00, 00, 00,
48, 8B, 0D, 00, 00, 00, 00,
48, 8B, 0D, 00, 00, 00, 00,
48, 83, 3D, 00, 00, 00, 00, 00,
48, 83, 3D, 00, 00, 00, 00, 00,
48, 83, 3D, 00, 00, 00, 00, 00,
48, 83, 3D, 00, 00, 00, 00, 00 ]
references:
- offset: 3
kind: gotLoad32
target: malloc
- offset: 10
kind: gotLoad32
target: myPrivate
- offset: 17
kind: gotLoad32
target: myInterposable
- offset: 24
kind: gotUse32
target: malloc
- offset: 32
kind: gotUse32
target: myPrivate
- offset: 40
kind: gotUse32
target: myInterposable
- name: myPrivate
scope: global
interposable: no
- name: myInterposable
scope: global
interposable: yes
shared-library-atoms:
- name: malloc
load-name: libc.so
...
# CHECK: defined-atoms:
# CHECK: name: foo
# CHECK: references:
# CHECK: kind: pcrel32
# CHECK: offset: 3
# CHECK: target: L
# CHECK: kind: lea32wasGot
# CHECK: offset: 10
# CHECK: target: myPrivate
# CHECK: kind: pcrel32
# CHECK: offset: 17
# CHECK: target: L
# CHECK: kind: pcrel32
# CHECK: offset: 24
# CHECK: target: L
# CHECK: kind: pcrel32
# CHECK: offset: 32
# CHECK: target: L
# CHECK: kind: pcrel32
# CHECK: offset: 40
# CHECK: target: L
# CHECK: name: myPrivate
# CHECK: name: myInterposable
# CHECK: interposable: yes
# CHECK: name: L
# CHECK: type: got
# CHECK: type: got
# CHECK: type: got
# CHECK: shared-library-atoms:
# CHECK: name: malloc
# CHECK: ...