1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-21 09:57:18 +03:00

[Mach-O] wip

This commit is contained in:
Rui Ueyama 2021-09-21 12:55:09 +09:00
parent 18fb0d5d3f
commit c0daab6075
3 changed files with 5 additions and 5 deletions

View File

@ -44,7 +44,7 @@ static void create_synthetic_sections(Context &ctx) {
ctx.data_const_seg->sections.push_back(new GotSection(*ctx.data_const_seg));
ctx.data_seg->sections.push_back(new LaSymbolPtrSection(*ctx.data_seg));
ctx.data_seg->sections.push_back(new LazySymbolPtrSection(*ctx.data_seg));
ctx.data_seg->sections.push_back(new DataSection(*ctx.data_seg));
ctx.rebase.reset(new OutputRebaseSection(*ctx.linkedit_seg));

View File

@ -285,9 +285,9 @@ public:
static constexpr char contents[] = "Hello world\n";
};
class LaSymbolPtrSection : public OutputSection {
class LazySymbolPtrSection : public OutputSection {
public:
LaSymbolPtrSection(OutputSegment &parent);
LazySymbolPtrSection(OutputSegment &parent);
void copy_buf(Context &ctx) override;
std::vector<u8> contents = {0x94, 0x3f, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00};

View File

@ -676,7 +676,7 @@ GotSection::GotSection(OutputSegment &parent)
hdr.reserved1 = 1;
}
LaSymbolPtrSection::LaSymbolPtrSection(OutputSegment &parent)
LazySymbolPtrSection::LazySymbolPtrSection(OutputSegment &parent)
: OutputSection(parent) {
strcpy(hdr.sectname, "__la_symbol_ptr");
hdr.p2align = __builtin_ctz(8);
@ -685,7 +685,7 @@ LaSymbolPtrSection::LaSymbolPtrSection(OutputSegment &parent)
hdr.reserved1 = 2;
}
void LaSymbolPtrSection::copy_buf(Context &ctx) {
void LazySymbolPtrSection::copy_buf(Context &ctx) {
write_vector(ctx.buf + hdr.offset, contents);
}