1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-22 02:20:51 +03:00
Commit Graph

37 Commits

Author SHA1 Message Date
Rui Ueyama
3204bb01d9 Fix function pointer equality
Previously, a GOT relocation (e.g. R_X86_64_REX_GOTPCRELX) and a
R_X86_64_64 relocation referring the same imported symbols were
resolved to different addresses. Here is why:

 - When we saw a R_X86_64_64 relocation against an imported symbol,
   we created a PLT and resolve the relocation there.

 - GOT relocation is resolved to a GOT entry, which has a true
   address of an imported function at runtime, which is different
   from PLT entries that redirect calls to the real function.

With this patch, we no longer create a PLT entry for R_X86_64_64.
Instead, we emit a dynamic relocation so that it is always resolved
to a real function address.

Fixes GNU MP's `make check` failure, which was reported at
https://github.com/rui314/mold/issues/81
2021-07-10 17:54:57 +09:00
Rui Ueyama
e855b90344 Show stacktrace on SEGV and assertion failure 2021-07-09 23:34:39 +09:00
Rui Ueyama
d0265554a7 Refactor 2021-07-06 13:39:33 +09:00
Rui Ueyama
b721514f98 Rename a variable 2021-07-05 14:00:16 +09:00
Rui Ueyama
11f7653daf Refactor 2021-07-04 21:01:39 +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
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
333843a33d Add --warn-unresolved-symbols and --error-unresolved-symbols 2021-06-14 00:04:07 +09:00
Rui Ueyama
919e8cbc62 Write addends to sections even for RELA-type relocs
This is for bug-compatibility. Go wrongly assume that addends are
written to sections.

Fixes https://github.com/rui314/mold/issues/45
2021-06-13 01:35:31 +09:00
Rui Ueyama
45ee501b4c Do not generate unnecessary copy relocations 2021-06-13 01:35:31 +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
bb050128b3 Allow R_NONE in .rel.eh_frame 2021-06-08 23:36:19 +09:00
Rui Ueyama
2a61e5af51 Format 2021-05-31 12:48:52 +09:00
Rui Ueyama
87854faad8 Remove EhReloc 2021-04-16 20:40:45 +09:00
Rui Ueyama
45526b4a21 wip 2021-04-13 23:40:18 +09:00
Rui Ueyama
3d5365c034 wip 2021-04-13 20:31:58 +09:00
Rui Ueyama
e55c74405f wip 2021-04-12 20:09:37 +09:00
Rui Ueyama
7b5e459b35 wip 2021-04-12 19:57:50 +09:00
Rui Ueyama
d90c0651c9 wip 2021-04-03 21:20:48 +09:00
Rui Ueyama
058c531169 Remove rels from InputSection 2021-04-02 01:35:10 +09:00
Rui Ueyama
6f78032e47 esym 2021-04-01 23:32:07 +09:00
Rui Ueyama
92725015a5 wip 2021-04-01 18:49:16 +09:00
Rui Ueyama
c1e520a5b2 wip 2021-04-01 17:11:22 +09:00
Rui Ueyama
7cbddb5b10 wip 2021-04-01 12:44:38 +09:00
Rui Ueyama
083b8b53b5 wip 2021-04-01 12:14:05 +09:00
Rui Ueyama
7881366cf0 wip 2021-04-01 11:37:54 +09:00
Rui Ueyama
62be757616 wip 2021-03-31 21:16:13 +09:00
Rui Ueyama
f9af6357df wip 2021-03-31 20:18:12 +09:00
Rui Ueyama
c1412c457a wip 2021-03-31 19:50:52 +09:00
Rui Ueyama
ed6a21d206 wip 2021-03-31 18:49:42 +09:00
Rui Ueyama
43756315d8 wip 2021-03-31 12:15:03 +09:00
Rui Ueyama
1b6562598e wip 2021-03-31 10:12:16 +09:00
Rui Ueyama
fe77f277d3 wip 2021-03-30 23:47:01 +09:00
Rui Ueyama
47c8fdf66d wip 2021-03-30 23:20:42 +09:00
Rui Ueyama
391d6987f7 wip 2021-03-30 23:05:47 +09:00
Rui Ueyama
346ab01666 wip 2021-03-30 23:01:38 +09:00
Rui Ueyama
b19a4873a4 Split input_sections.cc 2021-03-30 22:55:58 +09:00