mirror of
https://github.com/rui314/mold.git
synced 2024-11-14 07:18:42 +03:00
temporary
This commit is contained in:
parent
24d82870f5
commit
9df6abe39e
@ -74,30 +74,10 @@ void InputSection::relocate(uint8_t *buf) {
|
||||
case R_X86_64_32:
|
||||
*(uint32_t *)loc = dst;
|
||||
break;
|
||||
case R_X86_64_32S:
|
||||
case R_X86_64_DTPOFF32:
|
||||
case R_X86_64_GOT32:
|
||||
case R_X86_64_GOTPC32:
|
||||
case R_X86_64_GOTPC32_TLSDESC:
|
||||
case R_X86_64_GOTPCREL:
|
||||
case R_X86_64_GOTPCRELX:
|
||||
case R_X86_64_GOTTPOFF:
|
||||
case R_X86_64_PC32:
|
||||
case R_X86_64_PLT32:
|
||||
case R_X86_64_REX_GOTPCRELX:
|
||||
case R_X86_64_SIZE32:
|
||||
case R_X86_64_TLSGD:
|
||||
case R_X86_64_TLSLD:
|
||||
case R_X86_64_TPOFF32:
|
||||
*(uint32_t *)loc = dst - cur - 4;
|
||||
break;
|
||||
case R_X86_64_64:
|
||||
case R_X86_64_DTPOFF64:
|
||||
case R_X86_64_GOT64:
|
||||
case R_X86_64_GOTOFF64:
|
||||
case R_X86_64_GOTPC64:
|
||||
case R_X86_64_PC64:
|
||||
case R_X86_64_SIZE64:
|
||||
*(uint64_t *)loc = dst;
|
||||
break;
|
||||
default:
|
||||
|
3
mold.h
3
mold.h
@ -63,6 +63,9 @@ struct Config {
|
||||
extern Config config;
|
||||
|
||||
[[noreturn]] inline void error(const Twine &msg) {
|
||||
static std::mutex mu;
|
||||
std::lock_guard<std::mutex> lock(mu);
|
||||
|
||||
llvm::errs() << msg << "\n";
|
||||
exit(1);
|
||||
}
|
||||
|
@ -60,13 +60,12 @@ void OutputPhdr::construct(std::vector<OutputChunk *> &chunks) {
|
||||
entries.push_back({phdr, members});
|
||||
};
|
||||
|
||||
if (out::interp) {
|
||||
// Create a PT_PHDR for the program header itself.
|
||||
add(PT_PHDR, PF_R, {out::phdr});
|
||||
// Create a PT_PHDR for the program header itself.
|
||||
add(PT_PHDR, PF_R, {out::phdr});
|
||||
|
||||
// Create an PT_INTERP.
|
||||
// Create an PT_INTERP.
|
||||
if (out::interp)
|
||||
add(PT_INTERP, PF_R, {out::interp});
|
||||
}
|
||||
|
||||
// Create PT_LOAD segments.
|
||||
bool first = true;
|
||||
|
Loading…
Reference in New Issue
Block a user