View Issue Details

IDProjectCategoryView StatusLast Update
0000490GCC - GNU C CompilerBugpublic2020-08-24 03:07
Reporterdmik Assigned Topsmedley  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Summary0000490: GCC4 emx plugin generates a N_EXP stub for local symbols
DescriptionThe full description of the problem is here: http://svn.netlabs.org/libc/ticket/220 (first two comments).

Back then, I fixed this in emxomf.exe but the correct place to fix the problem is the emx plugin in GCC.

I can't recall any test case for that ATM though. I will post one if I'm able to reproduce it.
TagsNo tags attached.

Activities

dmik

2011-10-04 07:55

reporter   ~0002014

This applies to GCC 4.4.2 in the first place and I guess to all later versions as well.

psmedley

2011-11-06 06:03

administrator   ~0002038

I still see this with latest 4.4.6 and emxomf.exe from libc064:

When building Qt:
weakld: error: Unresolved symbol (UNDEF EXPORT) '_T.3808'.
weakld: info: The symbol is referenced by:
    U:\dev\qt4_svn\src\gui\tmp\obj\release-shared\qmdisubwindow.obj
Ignoring unresolved externals reported from weak prelinker.
** EXPERIMENTAL (HLL) ** Open Watcom Linker Version 1.6beta1 Limited Availability
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
Error! E3033: directive error near '/nofree'

psmedley

2011-11-12 08:06

administrator   ~0002040

still not sure what is causing thsi one - VERY frustrating

psmedley

2011-11-12 08:20

administrator   ~0002041

I'm actually thinking this might be a binutils issue - ie gas might be causing the problem....

he emx binutils patches have lots of references to N_EXP - perhaps one of these is causing the issues?

psmedley

2011-11-12 08:21

administrator   ~0002042

even to the point that the following definitions are in the binutils patches:

+/* emx-specific symbols. */
+#define N_IMP1 0x68 /* Import reference (emx specific) */
+#define N_IMP2 0x6a /* Import definition (emx specific) */
+#define N_EXP 0x6c /* Export definition (emx specific) */

psmedley

2011-11-13 01:10

administrator   ~0002043

not sure now.... with standard emxomf.exe, Qt fails with:
    U:\dev\qt4_svn\src\gui\tmp\obj\release-shared\qmdisubwindow.obj
Ignoring unresolved externals reported from weak prelinker.
Error! E2028: _T.3809 is an undefined reference
Error! E2044: exported symbol _T.3809 not found
make[1]: *** [..\..\lib\QtGui4.dll] Error 1

compiling qmdisubwindow.cpp with -S shows in the .S code:
LLSDACSE6375:
    .text
    .p2align 4,,15
_T.3809:
LFB7737:

not sure if gas should be ignoring the _T.3809 symbol or if gcc shouldn't be outputting it in the first place....

psmedley

2011-11-13 01:22

administrator   ~0002044

bug is in GCC, triggered by -O2 flag

remove -O2 from tmp\obj\release-shared\CXXFLAGS.QtGui.Release.rsp does not put _T.3809 in the output and qtgui4.dll builds ok

psmedley

2014-10-11 19:05

administrator   ~0002872

Fixed in latest code

Issue History

Date Modified Username Field Change
2011-10-03 20:59 dmik New Issue
2011-10-04 07:55 dmik Note Added: 0002014
2011-11-06 06:03 psmedley Note Added: 0002038
2011-11-12 08:06 psmedley Note Added: 0002040
2011-11-12 08:20 psmedley Note Added: 0002041
2011-11-12 08:21 psmedley Note Added: 0002042
2011-11-13 01:10 psmedley Note Added: 0002043
2011-11-13 01:22 psmedley Note Added: 0002044
2011-11-16 19:56 psmedley Assigned To => psmedley
2011-11-16 19:56 psmedley Status new => assigned
2014-10-11 19:05 psmedley Note Added: 0002872
2014-10-11 19:05 psmedley Status assigned => resolved
2014-10-11 19:05 psmedley Resolution open => fixed
2020-08-24 03:07 psmedley Status resolved => closed