PATCH RFC: dwarf2 EH for Darwin

Stan Shebs shebs@apple.com
Tue Sep 10 18:18:00 GMT 2002


Jason Merrill wrote:

>On Mon, 09 Sep 2002 16:38:42 -0700, Stan Shebs <shebs@apple.com> wrote:
>
>>The first is the macro ASM_OUTPUT_DWARF_DELTA, which seems like
>>it probably ought to be a target hook, even though it only needs
>>a non-default value for the one target.
>>
>
>The comment at the beginning of dw2_asm_output_delta seems relevant.  Why
>does your implementation work for Darwin, when that comment suggests it
>shouldn't?
>
The Darwin assembler (gas 1.38 + years of in-parallel hacking) just
wants a pair of relocs, doesn't care about where the labels are defined.
I don't know what assembler the comment might be referring to.

But just for grins, I tried taking this bit out, and it no longer seems
to be necessary - must have been some cross-section deltas that went
away.  Running testsuite now to see if there are any oddball situations
that I've overlooked...

>The second is the TERMINATE_EH_FRAME_INFO, which looks kludgy to
>me, but I'm not clear on how this ought to be done.  The crux of
>the problem is that EH_FRAME_SECTION_NAME should not be set for
>Darwin, because it enables ELFish bits we don't really want.
>Perhaps the zero-termination choice ought to be a generic target
>hook too?
>
>
>It's already kludgy; this should have been handled better when the target
>hook for eh_frame_section was added.
>
>One option would be to terminate it only if targetm.eh_frame_section is
>still set to the default function.  Speaking of which, it probably makes
>sense to have two different default functions, depending on whether or not
>EH_FRAME_SECTION_NAME is defined.
>
That makes sense, thanks - I'll experiment a bit.

Stan

>




More information about the Gcc-patches mailing list