Files
clang-p2996/lld/test/dead-strip-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

63 lines
1.3 KiB
Plaintext

# RUN: lld -core --dead-strip %s | FileCheck -check-prefix=CHK1 %s
# RUN: lld -core %s | FileCheck -check-prefix=CHK2 %s
#
# Test that -dead-strip removes unreachable code and data
# and that not using that option leaves them.
#
---
defined-atoms:
- name: entry
dead-strip: never
references:
- offset: 1
kind: pcrel32
target: bar
- offset: 6
kind: pcrel32
target: baz
- name: mydead1
scope: global
undefined-atoms:
- name: bar
- name: baz
---
defined-atoms:
- name: mydead2
scope: global
type: data
- name: bar
scope: global
type: data
---
defined-atoms:
- name: baz
scope: global
type: code
- name: mydead3
type: code
...
# CHK1: name: entry
# CHK1-NOT: name: mydead1
# CHK1: name: bar
# CHK1-NOT: name: mydead2
# CHK1: name: baz
# CHK1-NOT: name: mydead3
# CHK1: ...
# CHK2: name: entry
# CHK2: name: mydead1
# CHK2: name: mydead2
# CHK2: name: bar
# CHK2: name: baz
# CHK2: name: mydead3
# CHK2: ...