mirror of
https://github.com/rui314/mold.git
synced 2024-12-28 19:04:27 +03:00
temporary
This commit is contained in:
parent
2776a6bf5b
commit
cfb3416e68
@ -178,16 +178,18 @@ void InputSection::copy_buf() {
|
|||||||
break;
|
break;
|
||||||
case R_ABS:
|
case R_ABS:
|
||||||
write(S + A);
|
write(S + A);
|
||||||
|
break;
|
||||||
|
case R_ABS_DYN:
|
||||||
|
if (is_readonly)
|
||||||
|
recompile_error();
|
||||||
|
|
||||||
if (config.pie && sym.is_relative()) {
|
write(S + A);
|
||||||
if (is_readonly)
|
|
||||||
recompile_error();
|
memset(dynrel, 0, sizeof(*dynrel));
|
||||||
memset(dynrel, 0, sizeof(*dynrel));
|
dynrel->r_offset = P;
|
||||||
dynrel->r_offset = P;
|
dynrel->r_type = R_X86_64_RELATIVE;
|
||||||
dynrel->r_type = R_X86_64_RELATIVE;
|
dynrel->r_addend = S + A;
|
||||||
dynrel->r_addend = S + A;
|
dynrel++;
|
||||||
dynrel++;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case R_DYN:
|
case R_DYN:
|
||||||
if (is_readonly)
|
if (is_readonly)
|
||||||
@ -298,10 +300,11 @@ void InputSection::scan_relocations() {
|
|||||||
rel_types[i] = R_DYN;
|
rel_types[i] = R_DYN;
|
||||||
sym.flags |= NEEDS_DYNSYM;
|
sym.flags |= NEEDS_DYNSYM;
|
||||||
file->num_dynrel++;
|
file->num_dynrel++;
|
||||||
|
} else if (sym.is_relative()) {
|
||||||
|
rel_types[i] = R_ABS_DYN;
|
||||||
|
file->num_dynrel++;
|
||||||
} else {
|
} else {
|
||||||
rel_types[i] = R_ABS;
|
rel_types[i] = R_ABS;
|
||||||
if (sym.is_relative())
|
|
||||||
file->num_dynrel++;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rel_types[i] = R_ABS;
|
rel_types[i] = R_ABS;
|
||||||
|
Loading…
Reference in New Issue
Block a user