Thread View: gnu.g++.help
1 messages
1 total messages
Started by Per G. Bilse
Sun, 26 Jul 1992 10:15
Help: g++ assembler output on V.4
Author: Per G. Bilse
Date: Sun, 26 Jul 1992 10:15
Date: Sun, 26 Jul 1992 10:15
100 lines
2630 bytes
2630 bytes
I'm experiencing a problem with g++ (v 2.2.2) on a '386 V.4
(Consensys, to be specific) ... g++ emits special section
directives for constructors and destructors, as appears normal
on V.4:
.section .dtors,"a",@progbits .long <address>
.section .ctors,"a",@progbits .long <address>
However, the assembler on my system distinctly dislikes anything
following the ``"a"'' ... complete sample output is as follows:
#include <stdio.h>
struct A {
A() { fputs("A\n", stdout); }
~A() { fputs("~A\n", stdout); }
};
A a;
main()
{
return 0;
}
.file "c++test.c"
.version "01.01"
gcc2_compiled.:
.ident "@(#)head:stdio.h 2.34.1.2"
.section .rodata
.LC0:
.string "A\n"
.LC1:
.string "~A\n"
.globl a
.data
.type a,@object
.size a,1
a:
.zero 1
.text
.align 16
.globl main
.type main,@function
main:
pushl %ebp
movl %esp,%ebp
xorl %eax,%eax
movl %ebp,%esp
popl %ebp
ret
.align 16
.Lfe1:
.size main,.Lfe1-main
.align 16
.globl _GLOBAL_.D.a
.type _GLOBAL_.D.a,@function
_GLOBAL_.D.a:
pushl %ebp
movl %esp,%ebp
pushl $__iob+16
pushl $.LC1
call fputs__FPCcP4FILE
movl %ebp,%esp
popl %ebp
ret
.align 16
.Lfe2:
.size _GLOBAL_.D.a,.Lfe2-_GLOBAL_.D.a
.section .dtors,"a",@progbits .long _GLOBAL_.D.a
.text
.align 16
.globl _GLOBAL_.I.a
.type _GLOBAL_.I.a,@function
_GLOBAL_.I.a:
pushl %ebp
movl %esp,%ebp
pushl $__iob+16
pushl $.LC0
call fputs__FPCcP4FILE
movl %ebp,%esp
popl %ebp
ret
.align 16
.Lfe3:
.size _GLOBAL_.I.a,.Lfe3-_GLOBAL_.I.a
.section .ctors,"a",@progbits .long _GLOBAL_.I.a
.ident "GCC: (GNU) 2.1"
I should add that I'm in dire straits with this one. I need to get
this working by the end of the month and have ordered the relevant
books, but delivery time on those seems to be a problem.
Any help would be greatly appreciated.
In advance, thanks.
--
Per G. Bilse: bilse@dkuug.dk bilse@login.dkuug.dk per@bilse.dk
work DKUUG, Universitetsparken 1-3, 2100 Copenhagen OE +45 31 39 73 22
priv Dannebrogsgade 35, DK-1660 Copenhagen V. +45 31 31 39 71
"It's spaghetti, Jim, but not as we know it"
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads