From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Received: (qmail 28377 invoked by uid 71); 11 Jan 2003 12:46:01 -0000 Date: Sat, 11 Jan 2003 12:46:00 -0000 Message-ID: <20030111124601.28376.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Benjamin K." Subject: Re: target/8507: [Cygwin] -fno-undersocring, -fno-underscore don't work Reply-To: "Benjamin K." X-SW-Source: 2003-01/txt/msg00714.txt.bz2 List-Id: 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." To: , , , , 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--