Fix a bug in thread local reloations
There was a bug (also uncovered via binutils) where R_X86_64_DTPOFF64 is
set uncorrectly. This program is the minimal reproducer of the seg fault
#include <errno.h>
int main() {
int oerrno = errno;
}
But it works after the bug fix.
This commit is contained in:
+1
-1
@@ -666,7 +666,7 @@ impl Linker {
|
||||
set_u64(tm as u64);
|
||||
}
|
||||
reloc::R_X86_64_DTPOFF64 => {
|
||||
set_u64((s + a) as u64);
|
||||
set_u64(rel.r_offset as u64);
|
||||
}
|
||||
reloc::R_X86_64_GLOB_DAT | reloc::R_X86_64_JUMP_SLOT => {
|
||||
set_u64(s as u64);
|
||||
|
||||
Reference in New Issue
Block a user