public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41533] New: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM
@ 2009-10-01 8:01 kirill at shutemov dot name
2009-10-01 8:02 ` [Bug c++/41533] " kirill at shutemov dot name
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: kirill at shutemov dot name @ 2009-10-01 8:01 UTC (permalink / raw)
To: gcc-bugs
This macro chooses the encoding of pointers embedded in the exception handling
sections.
It needed to generate correct .cfi_personality derective. Without it we always
have TEXTREL in C++ shared libraries and PIE, if it compiled with exceptions.
--
Summary: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented
for ARM
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kirill at shutemov dot name
GCC build triplet: arm-none-linux-gnueabi
GCC host triplet: arm-none-linux-gnueabi
GCC target triplet: arm-none-linux-gnueabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41533
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/41533] ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM
2009-10-01 8:01 [Bug c++/41533] New: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM kirill at shutemov dot name
@ 2009-10-01 8:02 ` kirill at shutemov dot name
2009-10-01 8:21 ` ubizjak at gmail dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: kirill at shutemov dot name @ 2009-10-01 8:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from kirill at shutemov dot name 2009-10-01 08:02 -------
Created an attachment (id=18686)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18686&action=view)
Implement ASM_PREFERRED_EH_DATA_FORMAT macros for ARM
This macro chooses the encoding of pointers embedded in the exception
handling sections.
It needed to generate correct .cfi_personality derective. Without it we
always have TEXTREL in C++ shared libraries and PIE, if it compiled
with exceptions.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41533
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/41533] ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM
2009-10-01 8:01 [Bug c++/41533] New: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM kirill at shutemov dot name
2009-10-01 8:02 ` [Bug c++/41533] " kirill at shutemov dot name
@ 2009-10-01 8:21 ` ubizjak at gmail dot com
2009-10-01 8:37 ` jakub at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ubizjak at gmail dot com @ 2009-10-01 8:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from ubizjak at gmail dot com 2009-10-01 08:21 -------
Patches should be posted to gcc-patches mailing list.
BTW: Where is the bug in your PR submission?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41533
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/41533] ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM
2009-10-01 8:01 [Bug c++/41533] New: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM kirill at shutemov dot name
2009-10-01 8:02 ` [Bug c++/41533] " kirill at shutemov dot name
2009-10-01 8:21 ` ubizjak at gmail dot com
@ 2009-10-01 8:37 ` jakub at gcc dot gnu dot org
2009-10-01 9:02 ` ramana at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-10-01 8:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2009-10-01 08:37 -------
AFAIK arm*-*-linux*eabi uses its own unwinding format, so it shouldn't be using
.cfi_* directives at all. It should force -fno-dwarf2-cfi-asm...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41533
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/41533] ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM
2009-10-01 8:01 [Bug c++/41533] New: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM kirill at shutemov dot name
` (2 preceding siblings ...)
2009-10-01 8:37 ` jakub at gcc dot gnu dot org
@ 2009-10-01 9:02 ` ramana at gcc dot gnu dot org
2009-10-01 10:07 ` kirill at shutemov dot name
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-10-01 9:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from ramana at gcc dot gnu dot org 2009-10-01 09:02 -------
Is it correct to generate .eh_frame for the arm-linux-gnueabi target ?
Shouldn't this rather be the ARM EABI exception handling tables instead ?
-fno-dwarf2-cfi-asm might be a workaround. I've seen a couple of bug reports
where this was the problem.
cheers
Ramana
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41533
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/41533] ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM
2009-10-01 8:01 [Bug c++/41533] New: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM kirill at shutemov dot name
` (3 preceding siblings ...)
2009-10-01 9:02 ` ramana at gcc dot gnu dot org
@ 2009-10-01 10:07 ` kirill at shutemov dot name
2009-10-01 10:54 ` ramana at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: kirill at shutemov dot name @ 2009-10-01 10:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from kirill at shutemov dot name 2009-10-01 10:07 -------
Ok. If .eh_frame should not be generated on ARM, we should to modify
dwarf2out_do_cfi_asm() to always return false on ARM. Right?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41533
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/41533] ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM
2009-10-01 8:01 [Bug c++/41533] New: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM kirill at shutemov dot name
` (4 preceding siblings ...)
2009-10-01 10:07 ` kirill at shutemov dot name
@ 2009-10-01 10:54 ` ramana at gcc dot gnu dot org
2009-10-01 11:09 ` kirill at shutemov dot name
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-10-01 10:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ramana at gcc dot gnu dot org 2009-10-01 10:54 -------
(In reply to comment #5)
> Ok. If .eh_frame should not be generated on ARM, we should to modify
> dwarf2out_do_cfi_asm() to always return false on ARM. Right?
>
Look at this patch submitted here. Can you try this to see if it works for you
? http://gcc.gnu.org/ml/gcc-patches/2009-10/msg00022.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41533
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/41533] ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM
2009-10-01 8:01 [Bug c++/41533] New: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM kirill at shutemov dot name
` (5 preceding siblings ...)
2009-10-01 10:54 ` ramana at gcc dot gnu dot org
@ 2009-10-01 11:09 ` kirill at shutemov dot name
2009-10-02 7:34 ` kirill at shutemov dot name
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: kirill at shutemov dot name @ 2009-10-01 11:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from kirill at shutemov dot name 2009-10-01 11:08 -------
Looks ok for me.
I'll test it, but it takes some time. I'll report results tomorrow.
This patch also fixes #40521, I guess.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41533
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/41533] ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM
2009-10-01 8:01 [Bug c++/41533] New: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM kirill at shutemov dot name
` (6 preceding siblings ...)
2009-10-01 11:09 ` kirill at shutemov dot name
@ 2009-10-02 7:34 ` kirill at shutemov dot name
2009-10-02 8:26 ` ramana at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: kirill at shutemov dot name @ 2009-10-02 7:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from kirill at shutemov dot name 2009-10-02 07:34 -------
(In reply to comment #6)
> (In reply to comment #5)
> > Ok. If .eh_frame should not be generated on ARM, we should to modify
> > dwarf2out_do_cfi_asm() to always return false on ARM. Right?
> >
>
> Look at this patch submitted here. Can you try this to see if it works for you
> ? http://gcc.gnu.org/ml/gcc-patches/2009-10/msg00022.html
>
No, it doesn't help.
$ cat 1.cc
void m(){}
$ gcc-4.4 -S 1.cc
$ cat 1.s
.cpu arm9tdmi
.fpu softvfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 18, 4
.file "1.cc"
.text
.align 2
.global _Z1mv
.type _Z1mv, %function
_Z1mv:
.fnstart
.LFB0:
.cfi_startproc
.cfi_personality 0x0,__gxx_personality_v0
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
.cfi_def_cfa_offset 4
add fp, sp, #0
.cfi_offset 11, -4
.cfi_def_cfa_register 11
add sp, fp, #0
ldmfd sp!, {fp}
bx lr
.cfi_endproc
.LFE0:
.cantunwind
.fnend
.size _Z1mv, .-_Z1mv
.ident "GCC: (GNU) 4.4.1 20090725 (ALT Linux 4.4.1-alt1)"
.section .note.GNU-stack,"",%progbits
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41533
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/41533] ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM
2009-10-01 8:01 [Bug c++/41533] New: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM kirill at shutemov dot name
` (7 preceding siblings ...)
2009-10-02 7:34 ` kirill at shutemov dot name
@ 2009-10-02 8:26 ` ramana at gcc dot gnu dot org
2009-10-02 9:07 ` kirill at shutemov dot name
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-10-02 8:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from ramana at gcc dot gnu dot org 2009-10-02 08:26 -------
(In reply to comment #8)
Are you testing the correct compiler ? After building my 4.4 tree (though a
cross compiler ) I see the code generated as below.
The only reason why this might not work is if you are trying to build an
arm-linux and not an arm-linux-gnueabi toolchain but your bug report indicates
otherwise.
As you can see there are no .cfi_* directives.
.cpu arm10tdmi
.fpu softvfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 2
.eabi_attribute 18, 4
.file "1.cc"
.text
.align 2
.global main
.type main, %function
main:
.fnstart
.LFB0:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
mov r0, #0
bx lr
.LFE0:
.cantunwind
.fnend
.size main, .-main
.ident "GCC: (GNU) 4.4.2 20091002 (prerelease) [trunk revision
152368]"
.section .note.GNU-stack,"",%progbits
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41533
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/41533] ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM
2009-10-01 8:01 [Bug c++/41533] New: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM kirill at shutemov dot name
` (8 preceding siblings ...)
2009-10-02 8:26 ` ramana at gcc dot gnu dot org
@ 2009-10-02 9:07 ` kirill at shutemov dot name
2009-10-05 9:28 ` ramana at gcc dot gnu dot org
2009-10-05 19:34 ` kirill at shutemov dot name
11 siblings, 0 replies; 13+ messages in thread
From: kirill at shutemov dot name @ 2009-10-02 9:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from kirill at shutemov dot name 2009-10-02 09:06 -------
(In reply to comment #9)
> (In reply to comment #8)
>
> Are you testing the correct compiler ?
Yes.
> After building my 4.4 tree (though a
> cross compiler ) I see the code generated as below.
>
> The only reason why this might not work is if you are trying to build an
> arm-linux and not an arm-linux-gnueabi toolchain but your bug report indicates
> otherwise.
$ gcc-4.4 -dumpmachine
arm-alt-linux-gnueabi
> As you can see there are no .cfi_* directives.
Do you use c++ compiler with enabled exception handling?
Do you have TEXTRELs in libstdc++ from this compiler?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41533
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/41533] ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM
2009-10-01 8:01 [Bug c++/41533] New: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM kirill at shutemov dot name
` (9 preceding siblings ...)
2009-10-02 9:07 ` kirill at shutemov dot name
@ 2009-10-05 9:28 ` ramana at gcc dot gnu dot org
2009-10-05 19:34 ` kirill at shutemov dot name
11 siblings, 0 replies; 13+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-10-05 9:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from ramana at gcc dot gnu dot org 2009-10-05 09:28 -------
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #8)
> >
> > Are you testing the correct compiler ?
>
> Yes.
>
> > After building my 4.4 tree (though a
> > cross compiler ) I see the code generated as below.
> >
> > The only reason why this might not work is if you are trying to build an
> > arm-linux and not an arm-linux-gnueabi toolchain but your bug report indicates
> > otherwise.
>
> $ gcc-4.4 -dumpmachine
> arm-alt-linux-gnueabi
>
> > As you can see there are no .cfi_* directives.
>
> Do you use c++ compiler with enabled exception handling?
> Do you have TEXTRELs in libstdc++ from this compiler?
>
Ouch - I just realized I'd committed and sent the wrong patch out. I've
committed a follow up patch now on trunk
http://gcc.gnu.org/ml/gcc-patches/2009-10/msg00260.html
cheers
Ramana
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41533
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/41533] ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM
2009-10-01 8:01 [Bug c++/41533] New: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM kirill at shutemov dot name
` (10 preceding siblings ...)
2009-10-05 9:28 ` ramana at gcc dot gnu dot org
@ 2009-10-05 19:34 ` kirill at shutemov dot name
11 siblings, 0 replies; 13+ messages in thread
From: kirill at shutemov dot name @ 2009-10-05 19:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from kirill at shutemov dot name 2009-10-05 19:34 -------
Yes, it works.
Thanks.
--
kirill at shutemov dot name changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41533
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-10-05 19:34 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-01 8:01 [Bug c++/41533] New: ASM_PREFERRED_EH_DATA_FORMAT macros is not implemented for ARM kirill at shutemov dot name
2009-10-01 8:02 ` [Bug c++/41533] " kirill at shutemov dot name
2009-10-01 8:21 ` ubizjak at gmail dot com
2009-10-01 8:37 ` jakub at gcc dot gnu dot org
2009-10-01 9:02 ` ramana at gcc dot gnu dot org
2009-10-01 10:07 ` kirill at shutemov dot name
2009-10-01 10:54 ` ramana at gcc dot gnu dot org
2009-10-01 11:09 ` kirill at shutemov dot name
2009-10-02 7:34 ` kirill at shutemov dot name
2009-10-02 8:26 ` ramana at gcc dot gnu dot org
2009-10-02 9:07 ` kirill at shutemov dot name
2009-10-05 9:28 ` ramana at gcc dot gnu dot org
2009-10-05 19:34 ` kirill at shutemov dot name
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).