1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-22 10:27:48 +03:00
Commit Graph

280 Commits

Author SHA1 Message Date
Rui Ueyama
1d16374763 Fix a test 2021-06-19 12:34:20 +09:00
Rui Ueyama
a0ecd0c8dc Add --unique=PATTERN
This is needed by Gentoo's sys-fabric/infinipath-psm-3.2 package.
2021-06-19 01:09:26 +09:00
Rui Ueyama
bd858faf94 Add --unresolved-symbols
This is needed by Gentoo's dev-libs/wayland-protocols-1.21 package.
2021-06-18 15:51:57 +09:00
Rui Ueyama
725834e0b1 Do not garbage-collect C-identifer sections
This is needed for Gentoo's sys-fs/udev-245.5-r1 package.
2021-06-18 12:57:12 +09:00
Rui Ueyama
37b88e3f5a Do not set executable bit for --relocatable outputs 2021-06-18 01:45:38 +09:00
Rui Ueyama
2203644a3b Fix section addresses
This is needed for Gentoo's net-libs/nodejs-14.16.1 package.
2021-06-17 23:48:31 +09:00
Rui Ueyama
e88dddb820 Add -z {text,notext,textoff] 2021-06-17 14:18:44 +09:00
Rui Ueyama
4e2b6fd315 Handle thin archives containing absolute paths 2021-06-17 14:18:44 +09:00
Rui Ueyama
22ca6bc288 Ignore --verbose 2021-06-17 14:18:44 +09:00
Rui Ueyama
59e971b61f Ignore empty symbol version
This is needed for Gentoo's sys-fs/mhddfs packages.
2021-06-16 22:41:50 +09:00
Rui Ueyama
e1a964acb2 Do not write duplicate entries to .dynsym
Fixes Gentoo's sys-libs/slang package.
2021-06-16 19:50:42 +09:00
Rui Ueyama
e7019ebf86 Add -z keep-text-section-prefix 2021-06-16 19:50:08 +09:00
Rui Ueyama
a715197be4 Export more symbols from executable if they could overwrite dso syms 2021-06-15 01:47:53 +09:00
Rui Ueyama
bc2ece0474 Fix --relocatable 2021-06-14 13:48:26 +09:00
Rui Ueyama
333843a33d Add --warn-unresolved-symbols and --error-unresolved-symbols 2021-06-14 00:04:07 +09:00
Rui Ueyama
4f31c22fac Fix output section name 2021-06-13 16:51:48 +09:00
Rui Ueyama
9cc309af75 Implement --relocatable
Fixes https://github.com/rui314/mold/issues/46
2021-06-11 21:57:43 +09:00
Rui Ueyama
98dbddaa77 Ignore .gnu.warning.* sections 2021-06-07 22:35:32 +09:00
Rui Ueyama
3324acafc5 Rename --icf to --icf=all for compatibility with lld and gold 2021-06-07 21:55:08 +09:00
Rui Ueyama
8bf21f9ea0 Report an error for unknown -z flags 2021-06-07 20:53:35 +09:00
Rui Ueyama
6d13fe2e7f Add -z muldefs as an alias to --allow-multiple-definition 2021-06-07 20:48:06 +09:00
Rui Ueyama
8833dcbcb0 Fix relocations for i386 PIC 2021-06-07 18:37:50 +09:00
Rui Ueyama
a0c3fcb1bb Do not put local symbols to .dynsym 2021-06-06 17:24:49 +09:00
Rui Ueyama
fc54693be5 Fix zlib-gnu-style compressed section decoding 2021-06-05 20:51:21 +09:00
Rui Ueyama
ee3b0293fd Rename an envvar 2021-06-04 20:32:58 +09:00
Rui Ueyama
6e7baef8d3 Set DT_RELACOUNT field 2021-06-04 20:04:30 +09:00
Rui Ueyama
b0b2406d84 Set the entry address to .text if entry point symbol is not defined 2021-06-04 15:30:32 +09:00
Rui Ueyama
b5c68b465e Revert "Change the default build-id size from 20 to 16 bytes"
This reverts commit fe76210da6
because I misunderstood the actual default size of build-id
of the GNU linkers.
2021-06-04 12:32:28 +09:00
Rui Ueyama
d3923b9f27 Weak symbols shouldn't keep as-needed DSOs
If all references to an DSO are weak, the DSO shouldn't be considered
being used in terms of --as-needed. This is needed for GNU ld compatibility.
2021-06-04 12:24:25 +09:00
Rui Ueyama
3fb870c80b Add --compress-debug-info=zlib-gnu 2021-06-03 23:57:06 +09:00
Rui Ueyama
fe76210da6 Change the default build-id size from 20 to 16 bytes
GNU ld's default build-id size is 16.
2021-06-03 22:14:55 +09:00
Rui Ueyama
f9e91aa391 Do not embed a library fullpath if it is given by -l 2021-06-01 15:15:25 +09:00
Rui Ueyama
1f3931fc9e Do not put non-alloc NOTE section into a PT_LOAD segment
This bug caused a test failure of Gentoo's dev-lang/go-1.16.4
paackage. Specifically, `go tool dist test testshared` failed
due to this bug.
2021-06-01 00:53:06 +09:00
Rui Ueyama
8219fdd688 Simplify input file priority
This change is required to build Gentoo's net-libs/libtorrent-0.13.8-r1
package with FEATURES=test, e.g.

  $ FEATURES=test emerge net-libs/libtorrent
2021-05-31 17:09:40 +09:00
Rui Ueyama
8940abf807 Sort .{init,fini}_array and .[cd]tors 2021-05-31 01:11:45 +09:00
Rui Ueyama
02fa969295 Place .ctors and .dtors into .init_array and .fini_array
This change is needed to build Gentoo's dev-lang/gprolog-1.4.5,
which is the GNU Forth package. GNU Forth creates ELF objects
itself, and it still uses .ctors and .dtors as opposed to .init_array
and .fini_array.
2021-05-30 22:05:07 +09:00
Rui Ueyama
ed98211a24 Allow to refer unversioned symbol within an object file
Previously, mold couldn't handle an object file which contains
versioned symbol `foo@@SOME_VERSION` that also has an undefined
symbol `foo`. Now, `foo` is resolved to `foo@@SOME_VERSION`.

This change is required to build Gentoo's media-libs/alsa-lib-1.2.3.2-r1
package.
2021-05-30 18:03:21 +09:00
Rui Ueyama
a2017e5d3a Skip incompatible library files
This change is required to build Gentoo's net-libs/libtorrent-0.13.8-r1
package.
2021-05-29 20:47:16 +09:00
Rui Ueyama
3cfbc0d66c Parallelize tests 2021-05-29 16:05:38 +09:00
Rui Ueyama
c805f7c087 Fix broken tests 2021-05-29 14:20:56 +09:00
Rui Ueyama
fbed89948c Add -R as an alias for -rpath
This change is required to build Gentoo dev-erlang/stringprep package.
2021-05-29 13:42:10 +09:00
Rui Ueyama
6b10fbd834 Add end, etext and edata symbols 2021-05-29 02:07:46 +09:00
Rui Ueyama
8fe15c8dc8 Make linker-synthesized symbols to overwrite other symbols 2021-05-29 00:31:40 +09:00
Rui Ueyama
de7ba9014f Add "GNU gold" to the --version string
The configure script in Gentoo's dev-libs/jansson-2.13.1-r1 package
treats mold 0.1.1 as GNU ld 0.1.1, which is from 1980s if existed.

Adding "GNU gold" to the help message solves the nasty issue, as the
configure script considers any version of GNU gold supports modern
features.
2021-05-27 15:24:30 +09:00
Rui Ueyama
310980fb7e Add --retain-symbols-file 2021-05-27 00:31:08 +09:00
Rui Ueyama
8dd0accc89 Do not exit immediately on --version 2021-05-23 18:22:20 +09:00
Rui Ueyama
3fab4ce3d2 Add missing dependencies 2021-05-23 16:20:55 +09:00
Rui Ueyama
a0a94f4637 Add -wrap option 2021-05-22 01:54:08 +09:00
Rui Ueyama
b9ab55dfa7 Add --image-base 2021-05-21 18:37:38 +09:00
Rui Ueyama
99abd52d6e Fix a broken test 2021-05-21 12:43:34 +09:00