1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-21 18:08:01 +03:00
Commit Graph

2739 Commits

Author SHA1 Message Date
Rui Ueyama
9abfeee0e3 Split a function and add tests 2021-07-01 10:00:08 +09:00
Rui Ueyama
44bdbbb164
Merge pull request #61 from johejo/fix_dso_detection
Fix DSO detection for installed with PREFIX
2021-07-01 09:39:11 +09:00
Rui Ueyama
b044ac844c
Merge pull request #63 from Logarithmus/readme-gcc-guide
README.md: add guide to using mold with GCC via -B option
2021-07-01 09:38:34 +09:00
Rui Ueyama
34a75dee02 Update README
I recommend users use the latest release instead of git HEAD
because HEAD may be broken in a subtle way. Before a release,
I build all Gentoo packages using mold, but I don't do that for
every commit because it takes ~2 days.
2021-07-01 09:28:35 +09:00
Artur Sinila
da619e8615
Various fixes in Makefile
Signed-off-by: Artur Sinila <freesoftware@logarithmus.dev>
2021-06-30 20:53:49 +03:00
Artur Sinila
aa7d0f5cca
README.md: add guide to using mold with GCC via -B option
Signed-off-by: Artur Sinila <freesoftware@logarithmus.dev>
2021-06-30 20:46:26 +03:00
Mitsuo Heijo
b6e97e5fb5 Fix DSO detection for installed with PREFIX
Signed-off-by: Mitsuo Heijo <mitsuo.heijo@gmail.com>
2021-07-01 01:48:39 +09:00
Rui Ueyama
6432114e2a Fix handling of --sysroot
Fixes https://github.com/rui314/mold/issues/59
2021-06-30 22:15:19 +09:00
Rui Ueyama
a89df30537
Merge pull request #57 from nehaljwani/mimalloc-static-only
[mimalloc] build only required target(s)
2021-06-30 08:18:32 +09:00
Rui Ueyama
9a09c777d9 Bump mold version to 0.9.1 2021-06-30 08:11:15 +09:00
Nehal J Wani
a1073e69b0
[mimalloc] build only required target(s)
The 'all' target builds the shared library as well as test binaries
which mold doesn't care about

Signed-off-by: Nehal J Wani <nehaljw.kkd1@gmail.com>
2021-06-29 16:34:46 -04:00
Rui Ueyama
782b7f9c55 Improve Gentoo test script 2021-06-29 21:41:30 +09:00
Rui Ueyama
6b7f7cd965 Allow R_NONE relocations against non-allocated sections
This is needed by Gentoo's virtual/dist-kernel package.
2021-06-29 21:37:43 +09:00
Rui Ueyama
989f69fdc5 Do not apply version scripts to DSO symbols
This is needed by Gentoo's dev-perl/Image-Imlib2-2.30.0-r1 package
because this fixes a mis-link issue of libbsd.
2021-06-27 21:44:42 +09:00
Rui Ueyama
27c0f9df16 Improve Gentoo test script 2021-06-27 17:48:38 +09:00
Rui Ueyama
5761dbc399 Fix a broken test 2021-06-27 17:03:59 +09:00
Rui Ueyama
4717afacf3 Add mimalloc as a git subtree instead of a submodule 2021-06-27 17:01:59 +09:00
Rui Ueyama
f0a11821a5 Merge commit 'f66a682401a2ab4544534574981e4c7f4d8c33fb' as 'mimalloc' 2021-06-27 16:59:21 +09:00
Rui Ueyama
f66a682401 Squashed 'mimalloc/' content from commit b19da8e
git-subtree-dir: mimalloc
git-subtree-split: b19da8e362acae8944c60a40cf5c40c8f5ebeb44
2021-06-27 16:59:21 +09:00
Rui Ueyama
ab8d3dd3f6 Remove a git submodule 2021-06-27 16:55:12 +09:00
Rui Ueyama
472ae01486 Refactor 2021-06-27 16:19:25 +09:00
Rui Ueyama
570a3556c5 Fix exported weak symbol
This is needed by Gentoo's app-admin/filebeat-7.9.3 package.
2021-06-27 12:37:14 +09:00
Rui Ueyama
d4e630221a Report an error if compiled on a big-endian machine 2021-06-26 15:25:09 +09:00
Rui Ueyama
4436e4a57d Improve error message for an attempt of LTO 2021-06-26 15:05:05 +09:00
Rui Ueyama
a0f7ee1e04 Sort 2021-06-26 14:11:46 +09:00
Rui Ueyama
fcd7ce30b6 Merge branch 'main' of github.com:rui314/mold into main 2021-06-26 14:11:09 +09:00
Rui Ueyama
c990e9850e
Merge pull request #54 from nehaljwani/fix-53
Ignore --no-add-needed
2021-06-26 14:10:53 +09:00
Rui Ueyama
9da364c4c5 Add comments 2021-06-26 13:51:10 +09:00
Nehal J Wani
25f8d01ca5
Ignore --no-add-needed
Resolves https://github.com/rui314/mold/issues/53

Signed-off-by: Nehal J Wani <nehaljw.kkd1@gmail.com>
2021-06-25 20:29:24 -04:00
Rui Ueyama
0b0e066cc5 Refactor 2021-06-25 23:36:53 +09:00
Rui Ueyama
25faaff028 Improve Gentoo test script 2021-06-25 20:12:17 +09:00
Rui Ueyama
bd1b044afc Accept extern "C" in version script
This is needed by Gentoo's dev-libs/opencl-clang-10.0.0.1-r1 package.
2021-06-25 16:48:40 +09:00
Rui Ueyama
901a43c687 Relax version script grammar
This is needed by Gentoo's media-libs/rlottie-0.2_p20210405 package.
2021-06-25 16:33:49 +09:00
Rui Ueyama
2e5088a001 Fix common symbol
This is needed by Gentoo's sci-electronics/voacapl-0.7.6 package.
2021-06-25 15:42:16 +09:00
Rui Ueyama
866a1dbec0 Improve Gentoo test script 2021-06-25 15:19:42 +09:00
Rui Ueyama
bd8059a366 Fix an issue that a .dynsym for PLT refers itself 2021-06-25 13:33:14 +09:00
Rui Ueyama
5046fae0cf Do not directly call imported functions
This is needed by Gentoo's sci-libs/lapack-3.9.0-r1 package.
2021-06-25 01:05:57 +09:00
Rui Ueyama
d9ecc2e3e6 Promote weak undefined symbols to weak dynamic symbols
Previously, if a weak undefined symbol cannot be resolved within
an output of the linker, mold turned it into an absolute symbol
with value 0. However, other linkers export such symbols as a
weak dynamic symbol, so that the symbol gets another chance to be
resolved at runtime.

This patch implements the behavior.

This is needed by Gentoo's dev-libs/nsync-1.20.1 package.
2021-06-25 00:44:35 +09:00
Rui Ueyama
a8ebb63b00 Create text relocations instead of copy relocations
This is needed by Gentoo's dev-lang/gnat-gpl-2019-r2 package.
2021-06-25 00:31:54 +09:00
Rui Ueyama
4787363651 Ignore --warn-constructors
This is needed by Gentoo's sys-apps/memtest86-4.3.7-r2 package.
2021-06-24 19:54:43 +09:00
Rui Ueyama
00c907158c Ignore -z {no,}combreloc
This is needed by Gentoo's sys-boot/refind-0.12.0-r1 package.
2021-06-24 19:24:00 +09:00
Rui Ueyama
fd1855a67b Make --version to exit immediately
This is needed by Gentoo's dev-lang/spidermonkey-78.10.1 package,
as its configure script assumes that the linker exit normally
even if extra options are given after `--version`.
2021-06-24 16:45:04 +09:00
Rui Ueyama
81dbbdda62 DSOs referenced by used DSOs are considered used
This is needed by Gentoo's sys-cluster/ampi-0_pre20140616 package.
2021-06-24 15:54:25 +09:00
Rui Ueyama
de668b125a Refactor 2021-06-24 15:50:08 +09:00
Rui Ueyama
dd04357363 Do not set STT_GNU_IFUNC to symbols .dynsym
We should not set STT_GNU_IFUNC to symbols in .dynsym because
from the other ELF module's point of view, it doens't matter
whether a symbol is IFUNC or not.

This is needed by Gentoo's sci-mathematics/nauty-2.6.7 package.
2021-06-21 10:32:30 +09:00
Rui Ueyama
04dcfe2ae3 Ignore -warn-once
This is needed by Gentoo's dev-embedded/gputils-1.5.0 package.
2021-06-21 09:44:09 +09:00
Rui Ueyama
f127281d05 Allow empty input files
mmap(2) fails if you pass 0 as an argument for `length` parameter,
so this case has to be handled as a special case.

This is needed by Gentoo's media-plugins/calf-0.90.3-r1 package.
2021-06-21 09:33:35 +09:00
Rui Ueyama
d3d056d27a Do not register common symbols as lazy symbols
In other words, a linker shouldn't pull out an object file from an
archive to resolve an existing undefined or a common symbol with a
common symbol.

This is needed by Gentoo's app-arch/dump-0.4.47 package.
2021-06-21 08:36:16 +09:00
Rui Ueyama
1bac9c7b8d Add -z nodump
This is needed by Gentoo's sci-libs/indilib-1.8.9 package.
2021-06-21 06:56:07 +09:00
Rui Ueyama
c876849144 Allow R_386_GOTPC relocations in non-allocated sections
This is not logically correct, because PC-relative offsets
make sense only against allocated sections. However,
this is needed by Gentoo's dev-lang/gnat-gpl-2018-r3 package.
2021-06-20 21:29:10 +09:00