mirror of
https://github.com/rui314/mold.git
synced 2024-11-10 19:26:38 +03:00
[Mach-O] wip
This commit is contained in:
parent
7f671f5390
commit
a71f70708c
@ -92,7 +92,7 @@ public:
|
||||
|
||||
class BindEncoder {
|
||||
public:
|
||||
BindEncoder(bool type_ptr);
|
||||
BindEncoder(bool is_lazy);
|
||||
void add(i64 dylib_idx, std::string_view sym, i64 flags, i64 seg_idx,
|
||||
i64 offset);
|
||||
void finish();
|
||||
|
@ -375,8 +375,8 @@ void OutputRebaseSection::copy_buf(Context &ctx) {
|
||||
write_vector(ctx.buf + hdr.offset, contents);
|
||||
}
|
||||
|
||||
BindEncoder::BindEncoder(bool type_ptr) {
|
||||
if (type_ptr)
|
||||
BindEncoder::BindEncoder(bool is_lazy) {
|
||||
if (!is_lazy)
|
||||
buf.push_back(BIND_OPCODE_SET_TYPE_IMM | BIND_TYPE_POINTER);
|
||||
}
|
||||
|
||||
@ -421,7 +421,7 @@ OutputBindSection::OutputBindSection(OutputSegment &parent)
|
||||
: OutputSection(parent) {
|
||||
is_hidden = true;
|
||||
|
||||
BindEncoder enc(true);
|
||||
BindEncoder enc(false);
|
||||
enc.add(1, "dyld_stub_binder", 0, 2, 0);
|
||||
enc.finish();
|
||||
|
||||
@ -437,7 +437,7 @@ OutputLazyBindSection::OutputLazyBindSection(OutputSegment &parent)
|
||||
: OutputSection(parent) {
|
||||
is_hidden = true;
|
||||
|
||||
BindEncoder enc(false);
|
||||
BindEncoder enc(true);
|
||||
enc.add(1, "_printf", 0, 3, 0);
|
||||
enc.finish();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user