bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ld appears to ignore --entry if --subsystem is posix


From: Alan Modra
Subject: Re: ld appears to ignore --entry if --subsystem is posix
Date: Tue, 21 May 2002 10:24:29 +0930
User-agent: Mutt/1.3.25i

On Sat, May 18, 2002 at 06:29:48PM +0200, KJK::Hyperion wrote:
> ---8<-- snip --8<---
> 
> gcc -Wl,--base-file,base.tmp \
>  -Wl,--entry,address@hidden \
>  -Wl,--file-alignment,0x20 -Wl,--section-alignment,0x20 
> -Wl,--subsystem,posix:19.90 -mdll -Wl,--image-base,0x400000 \
>  -o junk.tmp \
>  misc/psxx.coff misc/psxx.coff misc/main.o misc/stubs.o 
> ../../../../dk/w32/lib/ntdll.a
> 
> 
> D:\devtools\mingw\bin\..\lib\gcc-lib\i386-mingw32\2.95.3-6\..\..\..\..\i386-mingw32\bin\ld.exe:
>  
> warning: cannot find entry symbol ___PosixProcessStartup; defaulting to 
> 00400020
> 
> ---8<-- snip --8<---
> 
> Is it a bug as I think? Or am I doing something wrong?

Does the following cure your problem?  I only pretend to understand pe
format so this might not be right, but it seems reasonable to me.

        * emultempl/pe.em (set_pe_subsystem): Don't set "cmdline" when
        calling lang_add_entry.

Index: ld/emultempl/pe.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/pe.em,v
retrieving revision 1.59
diff -u -p -r1.59 pe.em
--- ld/emultempl/pe.em  15 Feb 2002 02:11:05 -0000      1.59
+++ ld/emultempl/pe.em  21 May 2002 00:52:51 -0000
@@ -448,7 +448,7 @@ set_pe_subsystem ()
              entry = alc_entry;
            }
 
-         lang_add_entry (entry, 1);
+         lang_add_entry (entry, 0);
 
          return;
        }

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



reply via email to

[Prev in Thread] Current Thread [Next in Thread]