mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 13:59:29 +02:00
windows: fix external linking with binutils >= 2.36, based on a patch by Pierre Muller
This commit is contained in:
parent
4cfe27bd3c
commit
2bdfabe607
@ -1157,15 +1157,15 @@ implementation
|
||||
{$ifdef arm}
|
||||
targetopts:='-m arm_wince_pe';
|
||||
{$endif arm}
|
||||
ExeCmd[1]:='ld '+targetopts+' $OPT $GCSECTIONS $MAP $STRIP $APPTYPE $ENTRY $IMAGEBASE $RELOC -o $EXE $RES';
|
||||
DllCmd[1]:='ld '+targetopts+' $OPT $GCSECTIONS $MAP $STRIP --dll $APPTYPE $ENTRY $IMAGEBASE $RELOC -o $EXE $RES';
|
||||
ExeCmd[1]:='ld '+targetopts+' $OPT $GCSECTIONS $MAP $STRIP $APPTYPE $ENTRY $IMAGEBASE $RELOC -o $EXE -T $RES';
|
||||
DllCmd[1]:='ld '+targetopts+' $OPT $GCSECTIONS $MAP $STRIP --dll $APPTYPE $ENTRY $IMAGEBASE $RELOC -o $EXE -T $RES';
|
||||
{ ExeCmd[2]:='dlltool --as $ASBIN --dllname $EXE --output-exp exp.$$$ $RELOC $DEF';
|
||||
use short forms to avoid 128 char limitation problem }
|
||||
ExeCmd[2]:='dlltool -S $ASBIN -D $EXE -e exp.$$$ $RELOC $DEF';
|
||||
ExeCmd[3]:='ld '+targetopts+' $OPT $STRIP $APPTYPE $ENTRY $IMAGEBASE -o $EXE $RES exp.$$$';
|
||||
ExeCmd[3]:='ld '+targetopts+' $OPT $STRIP $APPTYPE $ENTRY $IMAGEBASE -o $EXE -T $RES exp.$$$';
|
||||
{ DllCmd[2]:='dlltool --as $ASBIN --dllname $EXE --output-exp exp.$$$ $RELOC $DEF'; }
|
||||
DllCmd[2]:='dlltool -S $ASBIN -D $EXE -e exp.$$$ $RELOC $DEF';
|
||||
DllCmd[3]:='ld '+targetopts+' $OPT $STRIP --dll $APPTYPE $ENTRY $IMAGEBASE -o $EXE $RES exp.$$$';
|
||||
DllCmd[3]:='ld '+targetopts+' $OPT $STRIP --dll $APPTYPE $ENTRY $IMAGEBASE -o $EXE -T $RES exp.$$$';
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1362,6 +1362,7 @@ implementation
|
||||
Add(' ___crt_xt_start__ = . ;');
|
||||
Add(' *(SORT(.CRT$XT*)) /* Termination */');
|
||||
Add(' ___crt_xt_end__ = . ;');
|
||||
Add(' . = . ; /* This forces GNU linker to keep the section even if it is empty */');
|
||||
Add(' }');
|
||||
Add(' .tls BLOCK(__section_alignment__) :');
|
||||
Add(' {');
|
||||
@ -1370,6 +1371,7 @@ implementation
|
||||
Add(' *(.tls$)');
|
||||
Add(' *(SORT(.tls$*))');
|
||||
Add(' ___tls_end__ = . ;');
|
||||
Add(' . = . ; /* This forces GNU linker to keep the section even if it is empty */');
|
||||
Add(' }');
|
||||
Add(' .rsrc BLOCK(__section_alignment__) :');
|
||||
Add(' {');
|
||||
|
Loading…
Reference in New Issue
Block a user