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-10-06 17:16:02 +09:00
parent e2d7cd7b03
commit 45788bd8ad

View File

@ -17,11 +17,10 @@ static void add_section(Context &ctx, OutputSection &osec,
std::string_view segname, std::string_view sectname) {
for (ObjectFile *obj : ctx.objs) {
for (std::unique_ptr<InputSection> &sec : obj->sections) {
if (sec->hdr.segname == segname) {
if (sec->hdr.sectname == sectname)
for (Subsection &subsec : sec->subsections)
osec.members.push_back(&subsec);
sec->osec = &osec;
if (sec->hdr.segname == segname && sec->hdr.sectname == sectname) {
for (Subsection &subsec : sec->subsections)
osec.members.push_back(&subsec);
sec->osec = &osec;
}
}
}