[cfe-dev] --split-dwarf silently fails on non-Linux platforms

Ed Maste emaste at freebsd.org
Fri Mar 20 18:55:36 PDT 2015


On 20 March 2015 at 16:33, Eric Christopher <echristo at gmail.com> wrote:
>
> *shrug* I don't think it's worth the amount of effort of this discussion to
> be honest. I know I didn't think this hard about it when I added it :)

I wasn't trying to call out the change or turn this into a drawn-out
thread; I just wanted to raise awareness that there is also some
downside to enabling functionality on only one platform. A similar
case was the DWARF TLS reference issue (DTPOFF) - I found it was
failing on FreeBSD, and it took a bit of debugging to find out that it
was explicitly disabled on non-Linux, rather than being broken for
other reasons. Anyway, it's not really a big deal.

> lld and lldb don't support split dwarf for the record.

No, but I expect that support to develop over time, and we have gold
and gdb packages available in the interim.

> I fully doubt that
> the rest of the elf toolchain project does either.

I'm thinking specifically of the requirement for objcopy (elfcopy) to
support --extract-dwo and --strip-dwo for clang's use, and that's
trivial to implement. It's true that actual consumers of debug data
don't yet support it, and that will take more effort.

> I'd be interested in hearing what the maintainers of other ELF targets
>> think.
>
=> Do you mean the other BSDs or linux or...? Anyhow, I don't really think it's
> necessary. OSes that want to support it will need to add toolchain support
> for it (Toolchains.cpp and friends). I'll happily take a look at any
> patches.

I mean other BSDs, or ELF platforms other than Linux. With the patch
in D8484 on FreeBSD clang -gsplit-dwarf -o foo.o -c foo.c generates
the .o and .dwo with expected content.



More information about the cfe-dev mailing list