public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Strange ARM issue: wrong exception table type?
@ 2012-02-01 16:40 david.hagood
  2012-02-02 10:45 ` Matthew Gretton-Dann
  0 siblings, 1 reply; 8+ messages in thread
From: david.hagood @ 2012-02-01 16:40 UTC (permalink / raw)
  To: binutils

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).

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 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?

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-10-11 12:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-01 16:40 Strange ARM issue: wrong exception table type? david.hagood
2012-02-02 10:45 ` Matthew Gretton-Dann
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

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).