mirror of
https://github.com/rui314/mold.git
synced 2024-10-04 16:48:04 +03:00
[Mach-O] Do not strip __eh_frame
This commit is contained in:
parent
285ea7ba26
commit
cfb7c268f5
@ -101,11 +101,6 @@ void ObjectFile<E>::parse_sections(Context<E> &ctx) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Ignore __eh_frame as its role is superceded by __compact_unwind.
|
||||
// I'm not sure if this is the right thing to do, though.
|
||||
if (msec.match("__TEXT", "__eh_frame"))
|
||||
continue;
|
||||
|
||||
if (msec.attr & S_ATTR_DEBUG)
|
||||
continue;
|
||||
|
||||
|
@ -648,7 +648,7 @@ void RebaseSection<E>::compute_size(Context<E> &ctx) {
|
||||
|
||||
for (std::unique_ptr<OutputSegment<E>> &seg : ctx.segments)
|
||||
for (Chunk<E> *chunk : seg->chunks)
|
||||
if (chunk->is_output_section)
|
||||
if (chunk->is_output_section && !chunk->hdr.match("__TEXT", "__eh_frame"))
|
||||
for (Subsection<E> *subsec : ((OutputSection<E> *)chunk)->members)
|
||||
for (Relocation<E> &rel : subsec->get_rels())
|
||||
if (!rel.is_pcrel && rel.type == E::abs_rel && !refers_tls(rel.sym))
|
||||
|
Loading…
Reference in New Issue
Block a user