Commit Graph

11 Commits

Author SHA1 Message Date
Fangrui Song 962b29d716 ELFObjectWriter: Don't sort non-local symbols
As we don't sort local symbols, don't sort non-local symbols.  This makes
non-local symbols appear in their register order, which matches GNU as. The
register order is nice in that you can write tests with interleaved CHECK
prefixes, e.g.

```
// CHECK: something about foo
.globl foo
foo:
// CHECK: something about bar
.globl bar
bar:
```

With the lexicographical order, the user needs to place lexicographical smallest
symbol first or keep CHECK prefixes in one place.
2021-02-13 10:32:27 -08:00
Fangrui Song 1f69355802 [test] Make ELF tests amenable to the order of non-local symbols 2021-02-12 21:00:42 -08:00
Fangrui Song 1eda21e214 [ELF][test] Make tests more tolerant to exact symbol addresses
Delete relocation-local.s and relocation-shared.s - covered by various tests

llvm-svn: 371514
2019-09-10 12:28:07 +00:00
Fangrui Song b159906a9a [test] Change llvm-readobj -long-option to --long-option or well-known short options. NFC
Also change some options that have different semantics (cause confusion) in llvm-readelf mode:

-s => -S
-t => --symbols
-sd => --section-data

llvm-svn: 359651
2019-05-01 05:49:01 +00:00
Fangrui Song b6772b86e2 [ELF] Move `// REQUIRES:` line to the top
llvm-svn: 335676
2018-06-26 22:20:04 +00:00
Ed Maste 8fd0196c6f lld: Default image base address to 0x200000 on x86-64
Align to the large page size (known as a superpage or huge page).
FreeBSD automatically promotes large, superpage-aligned allocations.

Differential Revision:	https://reviews.llvm.org/D27042

llvm-svn: 287782
2016-11-23 17:44:02 +00:00
Rui Ueyama 5fc84a1828 Remove string table offsets from tests.
<N> where "foo (<N>)" is the offset of string "foo" in the string table.

llvm-svn: 285751
2016-11-01 21:26:28 +00:00
Eugene Leviant 3967ea05a9 Set entry address to 0x0 if no _start symbol
Differential revision: https://reviews.llvm.org/D23925

llvm-svn: 280912
2016-09-08 08:57:51 +00:00
Rui Ueyama 62ee16faa8 Remove Size from Undefined symbol.
There seems to be no reason to keep st_size of undefined symbols.
This patch removes the member for it. This patch will change outputs
in cases that undefined symbols are copied to output, but I think
this is unimportant.

Differential Revision: http://reviews.llvm.org/D19574

llvm-svn: 267826
2016-04-28 00:26:54 +00:00
Rafael Espindola 9c8904fb38 Rename ld.lld2 to ld.lld since it is the default.
llvm-svn: 253437
2015-11-18 06:11:01 +00:00
Rafael Espindola 4b1285c55a Rename test/elf2 to test/ELF.
llvm-svn: 253313
2015-11-17 05:36:42 +00:00