1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-14 07:18:42 +03:00
mold/elf
Rui Ueyama ffb8e03c97 [ELF] Make .rela.dyn and .rela.plt contiguous in an output file
glibc 2.22 or prior have a bug that the dynamic linker (ld-linux.so.2)
crashes on `dlopen` if .rela.dyn and .rela.plt are not contiguous in
the `dlopen`-ed file and RTLD_NOW is specified. That bug was fixed in
fa19d5c48a.

glibc 2.23 which includes the fix for the bug was released on 2016-02-18.
So, unless you are using glibc that is more than 5 years old, mold-
generated shared object files work fine with `dlopen`. But it is easy
to make the sections contiguous in file, so I'll commit this change as a
workaround for the bug.

Fixes https://github.com/rui314/mold/issues/120
2021-10-12 17:10:32 +09:00
..
arch-aarch64.cc Refactor 2021-10-01 00:35:42 +09:00
arch-i386.cc Refactor 2021-10-01 00:35:42 +09:00
arch-x86-64.cc Refactor 2021-10-01 00:35:42 +09:00
cmdline.cc [ELF] Fix --help message 2021-10-08 23:43:03 +09:00
elf.h Move code to elf sub-directory 2021-09-02 23:16:49 +09:00
gc-sections.cc [ELF] Rename Symbol<E>::intern -> intern 2021-10-05 08:31:28 +09:00
icf.cc [ELF] Reduce the size of Subsection struct 2021-09-29 16:30:04 +09:00
input-sections.cc Refactor 2021-10-01 00:35:42 +09:00
linker-script.cc [ELF] Rename variables 2021-10-02 14:12:42 +09:00
main.cc Move code from elf/output-file.cc to output-file.h 2021-10-05 11:37:30 +09:00
mapfile.cc [ELF] Rename OutputChunk Chunk 2021-10-04 10:16:24 +09:00
mold-wrapper.c Move code to elf sub-directory 2021-09-02 23:16:49 +09:00
mold.h Move code from elf/output-file.cc to output-file.h 2021-10-05 11:37:30 +09:00
object-file.cc [ELF] Rename Symbol<E>::intern -> intern 2021-10-05 08:31:28 +09:00
output-chunks.cc [ELF] Create .rodata.cst and .rodata.str sections 2021-10-07 13:55:46 +09:00
passes.cc [ELF] Make .rela.dyn and .rela.plt contiguous in an output file 2021-10-12 17:10:32 +09:00
relocatable.cc Move code from elf/output-file.cc to output-file.h 2021-10-05 11:37:30 +09:00
subprocess.cc [ELF] Fix "mold-wrapper.so is not found" error 2021-09-30 15:01:55 +09:00