public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "Benjamin K." <bkausbk@web.de>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: target/8507: [Cygwin] -fno-undersocring, -fno-underscore don't work
Date: Sat, 11 Jan 2003 12:46:00 -0000 [thread overview]
Message-ID: <20030111124601.28376.qmail@sources.redhat.com> (raw)
The following reply was made to PR target/8507; it has been noted by GNATS.
>From bkausbk@web.de Mon Jan 13 00:57:58 2003
From: "Benjamin K." <bkausbk@web.de>
To: <bkausbk@web.de>,
<gcc-gnats@gcc.gnu.org>,
<gcc-prs@gcc.gnu.org>,
<gcc-bugs@gcc.gnu.org>,
<nobody@gcc.gnu.org>
Cc:
Subject: Re: target/8507: [Cygwin] -fno-undersocring, -fno-underscore don't work
Date: Sat, 11 Jan 2003 13:38:36 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_0003_01C2B976.BE468F90
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
r=8507
>Can you give a small program that shows the problem
This is compiler specific as I said before, and problem is whidly known who
is using c compilers for i386 windows platform.
See attachment for detailed information.
"some.o.hexdump" contains some more information about the problem.
There are 2 hexdumps, one which uses symbol underscores and the other
one don't use this underscores.
some.c is the source file ... needless to say it only contain one function.
Benjamin Kalytta
------=_NextPart_000_0003_01C2B976.BE468F90
Content-Type: application/octet-stream;
name="some.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="some.c"
int MyFunc(){
}
------=_NextPart_000_0003_01C2B976.BE468F90
Content-Type: application/octet-stream;
name="some.o.hexdump"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="some.o.hexdump"
COFF OBJECT FILE DUMP:
00000000 4C 01 03 00 00 00 00 00 9C 00 00 00 0A 00 00 00 =
L.......=9C.......
00000010 00 00 05 00 2E 74 65 78 74 00 00 00 00 00 00 00 =
.....text.......
00000020 00 00 00 00 10 00 00 00 8C 00 00 00 00 00 00 00 =
........=8C.......
00000030 00 00 00 00 00 00 00 00 20 00 00 60 2E 64 61 74 ........ =
..`.dat
00000040 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =
a...............
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =
................
00000060 40 00 00 C0 2E 62 73 73 00 00 00 00 00 00 00 00 =
@..=C0.bss........
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =
................
00000080 00 00 00 00 00 00 00 00 80 00 00 C0 55 89 E5 5D =
........=80..=C0U=89=E5]
00000090 C3 90 90 90 90 90 90 90 90 90 90 90 2E 66 69 6C =
=C3=90=90=90=90=90=90=90=90=90=90=90.fil
000000A0 65 00 00 00 00 00 00 00 FE FF 00 00 67 01 73 6F =
e.......=FE=FF..g.so
000000B0 6D 65 2E 63 00 00 00 00 00 00 00 00 00 00 00 00 =
me.c............
000000C0 5F 4D 79 46 75 6E 63 00 00 00 00 00 01 00 20 00 =
_MyFunc....... .
000000D0 02 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =
................
000000E0 00 00 00 00 2E 74 65 78 74 00 00 00 00 00 00 00 =
.....text.......
000000F0 01 00 00 00 03 01 05 00 00 00 00 00 00 00 00 00 =
................
00000100 00 00 00 00 00 00 00 00 2E 64 61 74 61 00 00 00 =
.........data...
00000110 00 00 00 00 02 00 00 00 03 01 00 00 00 00 00 00 =
................
00000120 00 00 00 00 00 00 00 00 00 00 00 00 2E 62 73 73 =
.............bss
00000130 00 00 00 00 00 00 00 00 03 00 00 00 03 01 00 00 =
................
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =
................
00000150 04 00 00 00 ....
Symbol of function int MyFunc() will be "_MyFunc" as you see above.
Here the same thing with my modified version of GCC which don't produce =
any
underscore:
00000000 4C 01 03 00 00 00 00 00 9C 00 00 00 0A 00 00 00 =
L.......=9C.......
00000010 00 00 05 00 2E 74 65 78 74 00 00 00 00 00 00 00 =
.....text.......
00000020 00 00 00 00 10 00 00 00 8C 00 00 00 00 00 00 00 =
........=8C.......
00000030 00 00 00 00 00 00 00 00 20 00 00 60 2E 64 61 74 ........ =
..`.dat
00000040 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =
a...............
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =
................
00000060 40 00 00 C0 2E 62 73 73 00 00 00 00 00 00 00 00 =
@..=C0.bss........
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =
................
00000080 00 00 00 00 00 00 00 00 80 00 00 C0 55 89 E5 5D =
........=80..=C0U=89=E5]
00000090 C3 90 90 90 90 90 90 90 90 90 90 90 2E 66 69 6C =
=C3=90=90=90=90=90=90=90=90=90=90=90.fil
000000A0 65 00 00 00 00 00 00 00 FE FF 00 00 67 01 73 6F =
e.......=FE=FF..g.so
000000B0 6D 65 2E 63 00 00 00 00 00 00 00 00 00 00 00 00 =
me.c............
000000C0 4D 79 46 75 6E 63 00 00 00 00 00 00 01 00 20 00 =
MyFunc........ .
000000D0 02 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =
................
000000E0 00 00 00 00 2E 74 65 78 74 00 00 00 00 00 00 00 =
.....text.......
000000F0 01 00 00 00 03 01 05 00 00 00 00 00 00 00 00 00 =
................
00000100 00 00 00 00 00 00 00 00 2E 64 61 74 61 00 00 00 =
.........data...
00000110 00 00 00 00 02 00 00 00 03 01 00 00 00 00 00 00 =
................
00000120 00 00 00 00 00 00 00 00 00 00 00 00 2E 62 73 73 =
.............bss
00000130 00 00 00 00 00 00 00 00 03 00 00 00 03 01 00 00 =
................
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =
................
00000150 04 00 00 00 ....
As you can see here, symbol "MyFunc" don't have leading underscores.
You have to modify /gcc/gcc/config/i386/bsd.h
#define USER_LABEL_PREFIX "_" to
#define USER_LABEL_PREFIX ""
But there are some problems again, libgcc.a and some other libs contain
symbols with underscores, so using any of this lib function isn't =
possible with
my modified version.
------=_NextPart_000_0003_01C2B976.BE468F90--
next reply other threads:[~2003-01-11 12:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-11 12:46 Benjamin K. [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-05-12 11:28 steven
2003-01-11 1:43 bangerth
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=20030111124601.28376.qmail@sources.redhat.com \
--to=bkausbk@web.de \
--cc=gcc-prs@gcc.gnu.org \
--cc=nobody@gcc.gnu.org \
/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).