Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Apr 2013 12:45:10 +1000
From:      Andrew Turner <andrew@fubar.geek.nz>
To:        Tim Kientzle <kientzle@freebsd.org>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: GDB on EABI
Message-ID:  <20130415124510.46f76bec@bender>
In-Reply-To: <FCA527AD-F91F-46B8-9D28-340FCCE7FFF8@freebsd.org>
References:  <FCA527AD-F91F-46B8-9D28-340FCCE7FFF8@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 14 Apr 2013 11:45:00 -0700
Tim Kientzle <kientzle@freebsd.org> wrote:

> On RPI with a recent -CURRENT (r249461) built -DWITH_ARM_EABI.
> 
> Looks like GDB doesn't yet know about our EABI variant:
> 
> ...../contrib/gdb/gdb/arm-tdep.c:2589: internal-error:
> arm_elf_osabi_sniffer: Unknown ARM EABI version 0x5000000
This is gdb failing to correctly determine the ABI from the .note.tag
section. I made a change in [1] to use this section, however it appears
to not be working correctly here.

The reason it complains about the EABI version is because gdb uses it
if it is unable to determine the ABI by other means. As is is unneeded
for FreeBSD I haven't taught gdb about the above EABI version so it
complains to not know about it.


> I'm also still seeing a lot of problems from the rtld locking issue:
> 
> # top
> ld-elf.so.1: assert
> failed: /usr/home/tim/projects/crochet-rpi/src/libexec/rtld-elf/rtld_lock.c:233
> Abort (core dumped)
I've tracked down this as an issue where llvm incorrectly aligns the
stack in some cases within a leaf function that uses thread local
storage. As a work around you can edit
contrib/llvm/lib/Target/ARM/ARMFrameLowering.h to change the last
argument to TargetFrameLowering from 4 to 8. This will ensure all stack
frames are 8 byte aligned.

I have a patch I am planning on submitting upstream to fix this in a
better way but I am currently traveling and have not yet had a chance.

Andrew

[1]
http://svnweb.freebsd.org/base/head/contrib/gdb/gdb/osabi.c?r1=246312&r2=246311&pathrev=246312



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130415124510.46f76bec>