1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-11 05:46:58 +03:00
Commit Graph

1078 Commits

Author SHA1 Message Date
Rui Ueyama
cd47a3b2be [Mach-O] wip 2021-11-05 16:00:56 +09:00
Rui Ueyama
32cdec42cb [Mach-O] wip 2021-11-03 13:58:36 +09:00
Rui Ueyama
2524c6448e [Mach-O] wip 2021-11-02 15:43:18 +09:00
Rui Ueyama
2af5ec006e [Mach-O] wip 2021-11-02 13:45:32 +09:00
Rui Ueyama
4fee9df38d [Mach-O] wip 2021-10-14 20:20:38 +09:00
Rui Ueyama
ca9a6d0843 Move code from elf/output-file.cc to output-file.h 2021-10-05 11:37:30 +09:00
Rui Ueyama
de1db98cde Split mold.h into multiple headers 2021-10-05 11:24:48 +09:00
Rui Ueyama
97ff050396 Use s suffix 2021-10-04 15:41:49 +09:00
Rui Ueyama
e89af3ee94 Use sv suffix 2021-10-04 15:28:02 +09:00
Rui Ueyama
928c39937a Refactor 2021-10-03 16:26:31 +09:00
Rui Ueyama
001cf042d9 Refactor 2021-10-03 16:01:59 +09:00
Rui Ueyama
fcd10254b7 Rename variables 2021-10-03 16:01:59 +09:00
Rui Ueyama
bc3f556055 Make get_file_type() to recognize Mach-O file types 2021-10-03 13:44:45 +09:00
Rui Ueyama
19b1b0252c [Mach-O] Dump export table entries 2021-10-02 17:48:52 +09:00
Rui Ueyama
ebc8a68cb3 [ELF] Rename variables 2021-10-02 14:12:42 +09:00
Rui Ueyama
56b7c42fae Refactor 2021-10-01 00:35:42 +09:00
Rui Ueyama
52c7793326 Move archive-file.cc out of elf directory 2021-09-30 23:13:27 +09:00
Rui Ueyama
7c9205f68d Move memory-mapped-file.cc out of elf directory
So that we can use the class from mold/mach-o.
2021-09-30 23:13:22 +09:00
Rui Ueyama
a6c75e969d [ELF] Refactor 2021-09-30 00:10:56 +09:00
Rui Ueyama
5e3f526bc1 Refactor 2021-09-28 16:40:07 +09:00
Rui Ueyama
c74b2197f9 Refactor 2021-09-28 16:24:41 +09:00
Rui Ueyama
2844f1f573 [ELF] Refactor 2021-09-28 13:23:58 +09:00
Rui Ueyama
bc2bd0e26a [ELF] Refactor 2021-09-27 23:01:51 +09:00
Rui Ueyama
c40b9aea5f [Mach-O] Generalize perf.cc so that we can use the feature in mold/mach-o 2021-09-27 18:14:56 +09:00
Rui Ueyama
1fb421d82c Fix a bug for a very long pathname 2021-09-27 17:38:55 +09:00
Rui Ueyama
541399911d [ELF] Refactor 2021-09-26 19:55:46 +09:00
Rui Ueyama
43e513d7af [Mach-O] wip 2021-09-19 19:17:12 +09:00
Rui Ueyama
fbf3a1a24e [Mach-O] Programmatically construct rebase instructions 2021-09-19 12:01:03 +09:00
Rui Ueyama
da5effd52d [Mach-O] wip 2021-09-18 16:56:00 +09:00
Rui Ueyama
7232178513 [Mach-O] wip 2021-09-16 14:20:38 +09:00
Rui Ueyama
150565601b Move error handlers from mold::elf to mold 2021-09-15 15:32:42 +09:00
Rui Ueyama
6ab3ddaf8e Move cleanup handlers from mold::elf to mold 2021-09-15 15:25:14 +09:00
Rui Ueyama
7ffc3a4545 [Mach-O] Add a feature to dump an executable
This is not a linker feature, but in order to learn how Mach-O
executables are constructed, I'll implement a dump feature.
I'll remove the feature once I understand the structure of Mach-O
binaries.
2021-09-13 18:16:13 +09:00
Rui Ueyama
78bddacd5b Move target-independent files to the top directory 2021-09-08 19:49:51 +09:00
Rui Ueyama
459b5973bb Move code to elf sub-directory 2021-09-02 23:16:49 +09:00
Rui Ueyama
fd391b03ef Move everything into mold::elf namespace 2021-09-02 18:19:43 +09:00
Rui Ueyama
0ce0ceb2c2 Fix a build issue on macOS 2021-09-01 13:26:32 +09:00
Rui Ueyama
d994020807 Add missing include 2021-08-31 23:42:52 +09:00
Rui Ueyama
2a2da35c25 Remove unused declaration 2021-08-30 22:01:49 +09:00
Rui Ueyama
81cb2fab89 Refactor 2021-08-24 10:37:38 +00:00
Rui Ueyama
abc2ffc185 Refactor 2021-08-23 11:44:24 +09:00
Rui Ueyama
3c79d672dc Implement TLSDESC for AArch64 2021-08-22 11:34:22 +00:00
Rui Ueyama
96589d4acf Allow to put local symbols to .dynsym
We used to write only global symbols to .dynsym because, in most
use cases, .dynsym are used for resolving inter-module dependencies.
However, we need to put local symbols to .dynsym if they are thread-
local symbols.
2021-08-22 19:28:37 +09:00
Rui Ueyama
771fc02b6d Handle LLVM compiler-rt's .eh_frame symbols 2021-08-21 13:29:41 +09:00
Rui Ueyama
05b532af79 Refactor 2021-07-29 20:57:05 +09:00
Rui Ueyama
6b0d599a31 Fix i386 relocation addends
Fixes https://github.com/rui314/mold/issues/98
2021-07-26 19:32:08 +09:00
Rui Ueyama
e4e8535345 Remove CMakeLists.txt
I was experimenting with cmake to see if it is useful for mold,
but it looks like using cmake doesn't make much sense for us.
So I'm undoing all changes that I did for cmake.

cmake is definitely better than autoconf, and it is also useful
if your program is cross-platform. However, neither of the benefits
don't apply to mold; mold doesn't need a complex feature detection,
and it currently supports only ELF-based Unix-like systems.

I think Makefile is a lingua-franca, while CMakeLists.txt isn't.
The good ol' Makefile works just fine for mold.

In the future, mold might become a cross-platform product, and if
that happens, we might want to re-introduce cmake.
2021-07-21 16:27:29 +09:00
Rui Ueyama
33fef23ffb Enable assert() for release builds
Our assert() statements are pretty cheap. We want to enable them
even for release builds.

By default, cmake passes -DNDEBUG to disable assert() for release
builds. So, in this patch, we undefine it to re-enable assertions.
2021-07-20 21:13:03 +09:00
Rui Ueyama
cce1cb353f Fill .rela.dyn even if there's no .got 2021-07-16 15:43:37 +09:00
Rui Ueyama
7937360c6a Avoid "PAGE_SIZE" as an identifier
musl libc uses PAGE_SIZE as a macro name, so use other name as
a variable name.
2021-07-16 15:10:59 +09:00