elftoolchain update?

Will Andrews will at firepipe.net
Tue Sep 30 15:10:27 UTC 2014


Thanks Kai.

Could you please review the changes I made on my branch?  I'm still
working on this issue.

--Will.

On Tue, Sep 30, 2014 at 5:35 AM, Kai Wang <kaiw at freebsd.org> wrote:
> Hello Will,
>
> My apologies for the delayed reply. I've totally missed these few
> emails.
>
> I can investigate the C++ object files issue and make fixes for
> them ASAP.
>
> Regarding <elfdefinitions.h> header, it was used for elftoolchain to
> build on various OS independently. When merging elftoolchain back to
> FreeBSD, I found it's very hard to use the <elfdefinitions.h> header
> because of the conflicts. So I decided to continue using the existing
> system ELF headers. You approach of merging the missing defines from
> <elfdefinitions.h> to the elfXX.h headers looks good to me.
>
> Thanks,
> Kai
>
> On Fri, Sep 26, 2014 at 11:32:20AM -0600, Will Andrews wrote:
>> Hi,
>>
>> I've created a git-svn clone of the current elftoolchain, and applied
>> some fixes in a branch:
>> https://github.com/wca/elftoolchain/tree/freebsd
>>
>> Any objections if I update the copy in head using this branch?  I've
>> heard nothing from either Kai or Joseph.
>>
>> I'm not done testing yet -- it looks like there are some more bugfixes
>> needed to get ctfconvert to at least run against C++ object files
>> without bailing.  Just wanted to know if there are any specific
>> concerns that people might have.
>>
>> A related review involves an update for the ELF headers:
>> https://reviews.freebsd.org/D844
>>
>> I haven't finished testing this either (need to do an universe build
>> to check for conflicts), but my goal here is to achieve header parity
>> with <elfdefinitions.h> from elftoolchain, which is largely duplicate.
>> The elftoolchain header exports many more symbols that are used by its
>> userland programs.  This would include arch-specific interpretations
>> of some ELF structures.  I believe it's appropriate to export these on
>> a global basis, given that userland programs can legitimately be run
>> on object files built for architectures other than the system they're
>> running on.
>>
>> Thanks!
>> --Will.
>>
>> On Wed, Sep 17, 2014 at 5:01 PM, Will Andrews <will at freebsd.org> wrote:
>> > Hi,
>> >
>> > I see there have been a lot of updates & fixes to elftoolchain since
>> > the last import into FreeBSD/head nearly 8 months ago.  Are there any
>> > plans to update the import?
>> >
>> > I'm asking because it appears that ctfconvert currently crashes
>> > (specifically, due to a bug in dwarf_attrval_unsigned()), if you try
>> > to use it on C++ object files.
>> >
>> > This is easily demonstrated by applying this patch to FreeBSD/head and
>> > building sbin/devd with WITH_CTF=1:
>> > http://people.freebsd.org/~will/add-ctfconvert-to-cpp-object-files.diff
>> >
>> > Justin Gibbs (cc'd) posted about this issue in February, and it's
>> > still a problem:
>> > http://lists.freebsd.org/pipermail/freebsd-toolchain/2014-February/001121.html
>> >
>> > Thanks,
>> > --Will.


More information about the freebsd-toolchain mailing list