From: Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
To: "david.hagood@gmail.com" <david.hagood@gmail.com>
Cc: "binutils@sourceware.org" <binutils@sourceware.org>
Subject: Re: Strange ARM issue: wrong exception table type?
Date: Thu, 02 Feb 2012 10:45:00 -0000 [thread overview]
Message-ID: <20120202104445.GF392@e103070-lin.arm.com> (raw)
In-Reply-To: <35a37ea957466b2f7a770e7978aebfef.squirrel@localhost>
David,
On Wed, Feb 01, 2012 at 04:40:29PM +0000, david.hagood@gmail.com wrote:
> I am having a strange issue with cross-compiling ARM programs. When I
> build a C++ executable that throws exceptions, they don't work: no catch()
> statements work, and all throw operations go straight to std::terminate().
> My co-workers, who are using in theory the exact same tool chain, don't
> see this (and I've checked the md5sum of their tools vs. mine and they
> seem to match).
What toolchain are you using? If it is not a current binutils can you try
with current HEAD?
> I've traced it down to the assembler: I can have them compile the C++ file
> to a .s, and just assemble and link it, and it breaks. If they send me a
> .o and I link that, it works. The assembler files they send me are the
> same as the ones my compiler generates (verified via diff), but the
> objects they produce vs. the objects I produce are different.
>
> I've traced the point of difference to the .ARM.extab and .ARM.exidx
> sections:
>
> Contents of section .ARM.extab:
> - 0000 00000080 84429b01 b0b0b083 ff002501 .....B........%.
> + 0000 00000000 84429b01 b0b0b083 ff002501 .....B........%.
> 0010 1b1c9001 ac0101c0 01040000 dc013cac ..............<.
>
> Contents of section .ARM.exidx:
> - 0000 00000080 00000080 7c010080 34000080 ........|...4...
> - 0010 e0010080 40000080 ....@...
> + 0000 00000000 00000000 7c010000 34000000 ........|...4...
> + 0010 e0010000 40000000 ....@...
If possible can you provide the assembler source and the output of readelf
-u on both object files?
> If I read the ARM EABI spec correctly, the difference is that my assembler
> is generating the ARM Compact form (bit 31 set), and theirs are generating
> the standard form. I assume that's preventing the run time library from
> finding the catch() blocks.
>
> What would cause my "as" to generate a different output than theirs for
> the same input file? (and I've verified the MD5 of my "as" and theirs
> match). And how can I fix this?
Have you tried *exactly* the same as copied from one machine to another?
The symptoms you describe sound like a use of uninitialised memory bug.
However we need more information (as requested above) to be able to diagnose
the issue further.
Thanks,
Matt
--
Matthew Gretton-Dann
Principal Engineer, PD Software, ARM Ltd.
next prev parent reply other threads:[~2012-02-02 10:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 16:40 david.hagood
2012-02-02 10:45 ` Matthew Gretton-Dann [this message]
2012-02-02 15:31 ` david.hagood
2012-02-02 15:53 ` Matthew Gretton-Dann
2012-02-02 16:28 ` david.hagood
2012-02-02 17:07 ` Matthew Gretton-Dann
2012-02-02 17:23 ` david.hagood
2012-10-11 12:25 ` Guido Piasenza
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120202104445.GF392@e103070-lin.arm.com \
--to=matthew.gretton-dann@arm.com \
--cc=binutils@sourceware.org \
--cc=david.hagood@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).