Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always create a .eh_frame section even if it's empty
glibc's `__register_frame_info_bases` expect that it can read a terminator if a .eh_frame is empty. Removing the section completely caused a crash bug on Alpine Linux with musl as libc. Specifically, mold-generated binaries crash if all the following condition were met: 1. musl is used as a libc 2. .eh_frame is empty 3. libgcc_s.so is linked Prior to 06b5926, condition (3) was not usually satisfied, so we didn't notice this issue. Now, the shared library is linked against almost all output files because the file is referenced by `__deregister_frame_info`. https://github.com/bminor/glibc/blob/910aae6e5a2196938fc30fa54dd1e96f16774ce7/sysdeps/generic/unwind-dw2-fde.c#L105-L107 Fixes #1309
- Loading branch information