Commit Graph

221 Commits

Author SHA1 Message Date
micha
ad7d549965 + implement pascal inline asm start/halt code for linux/i386
git-svn-id: trunk@5181 -
2006-11-02 16:58:41 +00:00
Jonas Maebe
0909d46626 * fixed linker exit code detection in case of useshell
git-svn-id: trunk@5138 -
2006-11-01 00:19:20 +00:00
peter
7a2e0da7bd * extra parameter for file searching functions
that indicate if the cache shall be used or not
  * fixed compile of non-x86 targets

git-svn-id: trunk@5115 -
2006-10-31 10:56:58 +00:00
peter
9f5d69ce31 * make win32 compile
git-svn-id: trunk@5103 -
2006-10-30 23:46:28 +00:00
peter
cb246eb781 * Remove dos,strings units, use SysUtils instead
* replace split* functions with Extract* functions
  * Add Directory caching

git-svn-id: trunk@5102 -
2006-10-30 23:29:35 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
bf1c390027 * refactor import library generation
* support variable imports in internal linker

git-svn-id: trunk@4544 -
2006-09-03 19:22:31 +00:00
Jonas Maebe
e52ff8bbcf * used gar instead of ar on solaris
git-svn-id: trunk@4393 -
2006-08-08 17:11:46 +00:00
peter
80bd513997 * add some info for -vx
git-svn-id: trunk@4389 -
2006-08-07 20:01:01 +00:00
Károly Balogh
cf3b4ec3a3 + fixed scripts to have proper deletedir commands
git-svn-id: trunk@4073 -
2006-07-02 10:40:10 +00:00
yury
03f892719d * added import by ordinal number in internal linker.
git-svn-id: trunk@4037 -
2006-07-01 15:53:18 +00:00
peter
f5c1839ff0 * support static library (.a) linking
* move win linker script to t_win
  * rename some win32 to win in t_win

git-svn-id: trunk@3991 -
2006-06-28 20:26:53 +00:00
marco
2a5332e3bd * Link ordering working FreeBSD implementation
git-svn-id: trunk@3894 -
2006-06-19 14:17:45 +00:00
marco
179451dcfd * Initial linkordering subsystem. Not active (need t_* mods which I want in a different revision to ease merging)
git-svn-id: trunk@3788 -
2006-06-04 12:44:48 +00:00
peter
a57708e63d * DLL support
git-svn-id: trunk@3623 -
2006-05-21 21:07:49 +00:00
Tomas Hajny
a62c1faa2d + output is flushed before launching external utilities
git-svn-id: trunk@3539 -
2006-05-15 00:28:55 +00:00
peter
d69ad5d84d * cleanup external/nolink options
git-svn-id: trunk@3375 -
2006-04-29 21:49:37 +00:00
peter
ce58e15393 * fix coff section names to fix resourcestrings with
the external linker
  * create import libraries for dll imports, this uses
    the new objdata framework to generate the binary
    object files directly without needing an assembler pass
  * store import_dll and import_name in ppu
  * external linker uses import libraries
  * internal linker uses import info from symtables,
    no dlls are needed anymore

git-svn-id: trunk@3255 -
2006-04-17 20:48:22 +00:00
Jonas Maebe
adea84b807 * made ar'ing of smartlinked libraries a lot faster
git-svn-id: trunk@3234 -
2006-04-16 18:42:15 +00:00
peter
7f4b051f99 * support subsystem
* fixed stab
  * always keep .rsrc section

git-svn-id: trunk@3089 -
2006-03-30 11:24:17 +00:00
peter
37c81492ad Merged revisions 2827,2831,2837,2932-2980 via svnmerge from
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler

r2827 (peter)
  * smartlinking of resourcestrings


r2831 (peter)
  * process_ea 64bit fixes


r2837 (peter)
  * linker script

git-svn-id: trunk@2981 -
2006-03-19 22:12:52 +00:00
peter
b7fe6797bf Merged revisions 2921-2922,2925 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2921 | peter | 2006-03-15 08:35:00 +0100 (Wed, 15 Mar 2006) | 2 lines

  * pass ObjectWriter to ObjectOuput

........
r2922 | peter | 2006-03-15 12:40:30 +0100 (Wed, 15 Mar 2006) | 2 lines

  * refactor asmdata

........
r2925 | peter | 2006-03-15 16:09:39 +0100 (Wed, 15 Mar 2006) | 3 lines

  * add cfi to asmdata
  * move asmlist, asmcfi, asmdata to own unit

........

git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
peter
5a90c00aae * stop linking if errors during symbol rsolving happen
git-svn-id: trunk@2906 -
2006-03-13 12:29:11 +00:00
peter
17bc033747 Merged revisions 2791-2793,2798-2800,2806-2825,2829-2830,2833,2839,2898 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2791 | peter | 2006-03-06 14:57:20 +0100 (Mon, 06 Mar 2006) | 3 lines

  * disable internal linker if -s is used
  * enable section smartlink by default for internal linker

........
r2792 | peter | 2006-03-06 14:58:23 +0100 (Mon, 06 Mar 2006) | 2 lines

  * support long sectionnames

........
r2793 | peter | 2006-03-06 15:04:12 +0100 (Mon, 06 Mar 2006) | 2 lines

  * register symbols in section also when reading .o files

........
r2798 | peter | 2006-03-07 10:08:07 +0100 (Tue, 07 Mar 2006) | 2 lines

  * symbolrefs need to be loaded from relocations when loading a .o

........
r2799 | peter | 2006-03-07 16:17:52 +0100 (Tue, 07 Mar 2006) | 3 lines

  * remove unreferenced sections
  * set stacksize in peopthaeder

........
r2800 | peter | 2006-03-07 17:02:46 +0100 (Tue, 07 Mar 2006) | 2 lines

  * objsection.fullname added

........
........
r2807 | peter | 2006-03-08 08:18:04 +0100 (Wed, 08 Mar 2006) | 2 lines

  * powerpc64 fixes

........
r2808 | peter | 2006-03-08 08:35:53 +0100 (Wed, 08 Mar 2006) | 2 lines

  * register x86_64_pecoff

........
r2809 | peter | 2006-03-08 11:26:38 +0100 (Wed, 08 Mar 2006) | 2 lines

  * optimize and cleanup matches()

........
r2810 | peter | 2006-03-08 12:25:28 +0100 (Wed, 08 Mar 2006) | 2 lines

  * small tweak to readdata to copy values direct without calling move()

........
r2811 | peter | 2006-03-08 15:55:21 +0100 (Wed, 08 Mar 2006) | 2 lines

  * compile fix

........
........
........
........
........
........
r2817 | peter | 2006-03-09 14:20:52 +0100 (Thu, 09 Mar 2006) | 2 lines

  * more readable with long secnames

........
........
........
........
........
........
........
........
r2825 | peter | 2006-03-10 09:52:05 +0100 (Fri, 10 Mar 2006) | 2 lines

  * don't initialize/finalize external variables

........
r2829 | peter | 2006-03-10 10:58:08 +0100 (Fri, 10 Mar 2006) | 2 lines

  * merge 64bit assembler

........
r2830 | peter | 2006-03-10 12:25:08 +0100 (Fri, 10 Mar 2006) | 2 lines

  * TElfAssembler rename

........
r2833 | peter | 2006-03-10 15:22:27 +0100 (Fri, 10 Mar 2006) | 3 lines

  * support & prefix to force identifier parsing, used to access fields that
    have the names of a register

........
r2839 | peter | 2006-03-10 19:37:11 +0100 (Fri, 10 Mar 2006) | 2 lines

  * merge stabs section flags

........
r2898 | peter | 2006-03-12 23:18:18 +0100 (Sun, 12 Mar 2006) | 2 lines

  * reorder instructions for better first match

........

git-svn-id: trunk@2902 -
2006-03-13 09:29:57 +00:00
florian
4be2b9411e + support for ar scripts, from Yury Sidorov
git-svn-id: trunk@2863 -
2006-03-11 16:53:10 +00:00
peter
785550d7e3 Merged revisions 2669,2673,2677,2683,2696,2699-2702,2704,2708,2712-2715,2718,2722-2723,2728-2730,2740,2769 via svnmerge from
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler

........
r2669 | peter | 2006-02-23 09:31:21 +0100 (Thu, 23 Feb 2006) | 2 lines

  * add compiler dir

........
r2673 | peter | 2006-02-23 17:08:56 +0100 (Thu, 23 Feb 2006) | 2 lines

  * enabled more code

........
r2677 | peter | 2006-02-24 17:46:29 +0100 (Fri, 24 Feb 2006) | 2 lines

  * pe stub and headers

........
r2683 | peter | 2006-02-25 23:13:24 +0100 (Sat, 25 Feb 2006) | 2 lines

  * section options cleanup

........
r2696 | peter | 2006-02-26 20:27:41 +0100 (Sun, 26 Feb 2006) | 2 lines

  * fixed typecasts

........
r2699 | peter | 2006-02-26 23:04:32 +0100 (Sun, 26 Feb 2006) | 2 lines

  * simple linking works

........
r2700 | peter | 2006-02-27 09:44:50 +0100 (Mon, 27 Feb 2006) | 2 lines

  * internal linker script

........
r2701 | peter | 2006-02-27 12:05:12 +0100 (Mon, 27 Feb 2006) | 2 lines

  * make elf working again

........
r2702 | peter | 2006-02-27 14:04:43 +0100 (Mon, 27 Feb 2006) | 3 lines

  * disable dwarf for smartlinking with .a
  * fix section start in new .a file

........
r2704 | peter | 2006-02-27 18:30:43 +0100 (Mon, 27 Feb 2006) | 2 lines

  * stab section fixes

........
r2708 | peter | 2006-02-28 19:29:17 +0100 (Tue, 28 Feb 2006) | 2 lines

  * basic work to merge stabs sections

........
r2712 | peter | 2006-02-28 23:17:48 +0100 (Tue, 28 Feb 2006) | 2 lines

  * unload tmodules before linking

........
r2713 | peter | 2006-02-28 23:18:51 +0100 (Tue, 28 Feb 2006) | 2 lines

  * fixed stabs linking

........
r2714 | peter | 2006-02-28 23:19:19 +0100 (Tue, 28 Feb 2006) | 2 lines

  * show code and data size

........
r2715 | peter | 2006-02-28 23:25:35 +0100 (Tue, 28 Feb 2006) | 2 lines

  * unload .stabs from objdata after it is merged

........
r2718 | peter | 2006-03-01 12:24:38 +0100 (Wed, 01 Mar 2006) | 3 lines

  * memsize/datasize cleanup
  * check for exports/resources when adding module to linker

........
r2722 | peter | 2006-03-03 09:12:20 +0100 (Fri, 03 Mar 2006) | 2 lines

  * new TObjSymbol splitted from TAsmSymbol

........
r2723 | peter | 2006-03-03 14:08:55 +0100 (Fri, 03 Mar 2006) | 2 lines

  * coff fixes after recent objsymbol changes

........
r2728 | peter | 2006-03-03 22:43:04 +0100 (Fri, 03 Mar 2006) | 2 lines

  * fixed coff writer

........
r2729 | peter | 2006-03-04 01:10:32 +0100 (Sat, 04 Mar 2006) | 2 lines

  * fix read-only opening

........
r2730 | peter | 2006-03-04 01:11:16 +0100 (Sat, 04 Mar 2006) | 2 lines

  * Read edata from DLLs, basic work

........
r2740 | peter | 2006-03-04 21:13:43 +0100 (Sat, 04 Mar 2006) | 3 lines

  * deletedef added
  * don't remove defs from index when we are already clearing everything

........
r2769 | peter | 2006-03-05 21:42:33 +0100 (Sun, 05 Mar 2006) | 4 lines

  * moved TObj classes to ogbase
  * ObjSection.SymbolRefs and SymbolDefines list
  * DLL importing

........

git-svn-id: trunk@2771 -
2006-03-05 21:10:37 +00:00
florian
2c10e841b9 * ar patch from Yury
git-svn-id: trunk@2638 -
2006-02-19 21:33:59 +00:00
Jonas Maebe
5f3e0b5398 * link_allways -> link_always
git-svn-id: trunk@2594 -
2006-02-15 14:36:30 +00:00
tom_at_work
a2307edf2c * fixed -dUSE_SYSUTILS compilation
* the call to "ar" is now automatically broken into multiple calls, avoiding shell errors when expanding the '*' in the original commandline

git-svn-id: trunk@2378 -
2006-01-29 18:01:53 +00:00
peter
66f8276445 * refactor booleans in systeminfo structure, they are now flags
* support for case aware filesystems (Windows), they do now only
    one lookup if a file exists
  * add -WI option to generate import section for DLL imports or
    let the linker handle it. Default is still import section until
    the Makefiles are fixed, then the generation can be left to the
    linker

git-svn-id: trunk@2274 -
2006-01-13 15:13:26 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
armin
f7a03147bb * increased maxsize of ExeCmd and DllCmd 2005-01-01 20:18:24 +00:00
peter
dc363f29bc * maybequoted() added 2004-12-22 16:32:45 +00:00
peter
589dd8c10e First check outputunitdir/outputexedir for .o file 2004-11-03 22:22:51 +00:00
mazen
cdd920623b * Merge is complete for this file, cycles ! 2004-10-14 16:25:39 +00:00
olle
bf57e41ac5 * Exchanged hardcoded "./" to CurDirRelPath
* In FindObjectFile, when link on target, special handling is now
    only done for units.
2004-10-09 11:37:09 +00:00
Jonas Maebe
75c3c8b259 * shell now returns an exitcode
* print an error if linking failed when linking was done using a script
2004-07-17 15:51:57 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
olle
f11951edf2 * increased maxsize of link.res file name
* fixed a 255-limit in TScript.WriteToDisk
2004-02-24 00:53:48 +00:00
olle
dfa6403a70 + Support for Link on target especially for MacOS
+ TLinkerMPW
  + TAsmScriptMPW
2004-02-19 20:40:15 +00:00
florian
f7418d3286 * fixed external smartlinking 2003-12-11 17:53:03 +00:00
peter
1fcc82e61a * don't check exepath when linking on target 2003-09-14 21:33:11 +00:00
peter
ab66b66673 * add inputfile prefix to ppas/link.res 2003-06-12 16:41:51 +00:00
peter
1a2eedd767 * self moved to hidden parameter
* removed hdisposen,hnewn,selfn
2003-05-09 17:47:02 +00:00
peter
35801981d1 * .o files belonging to the unit are first searched in the same dir
as the .ppu
2003-04-26 09:16:07 +00:00
carl
ee4b7ba31b - removed my stupid hello debug code 2003-02-12 22:04:59 +00:00
peter
bfd72ad5d5 * merged changes from 1.0.7 up to 04-11
- -V option for generating bug report tracing
    - more tracing for option parsing
    - errors for cdecl and high()
    - win32 import stabs
    - win32 records<=8 are returned in eax:edx (turned off by default)
    - heaptrc update
    - more info for temp management in .s file with EXTDEBUG
2002-11-15 01:58:45 +00:00
carl
c328dff091 - removed no longer used defines 2002-11-09 15:37:21 +00:00
peter
dcd9e0107c * old logs removed and tabs fixed 2002-09-07 15:25:00 +00:00
carl
9da171faf2 + stab register indexes for powerpc (moved from gdb to cpubase)
+ tprocessor enumeration moved to cpuinfo
  + linker in target_info is now a class
  * many many updates for m68k (will soon start to compile)
  - removed some ifdef or correct them for correct cpu
2002-08-12 15:08:39 +00:00
peter
4285e99853 * internal linker
* reorganized aasm layer
2002-07-01 18:46:20 +00:00
peter
06ebac4e27 * readded missing revisions 2002-05-18 13:34:04 +00:00
carl
21b3a10f02 + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
+ try to fix temp allocation (still in ifdef)
+ generic constructor calls
+ start of tassembler / tmodulebase class cleanup
2002-05-16 19:46:34 +00:00
peter
2992e1819c * removed old logs and updated copyright year 2002-05-14 19:34:38 +00:00
peter
2e96721c20 * fixed path appending for lib 2002-01-19 11:57:05 +00:00
michael
f959a590fe * Fixes win32 linking problems with import libraries
* LINKLIB Libraries are now looked for using C file extensions
* get_exepath fix
2001-09-18 11:30:47 +00:00
peter
45dab81414 * merged netbsd, fpu-overflow from fixes branch 2001-09-17 21:29:10 +00:00
peter
f88f6eb571 * rtti/init table updates
* rttisym for reusable global rtti/init info
  * support published for interfaces
2001-08-30 20:13:52 +00:00
peter
fd8e5fa78c * palmos support from v10 merged 2001-08-19 11:22:22 +00:00
peter
38770359fe * fixed ordering of object and libraries 2001-08-13 19:26:03 +00:00
peter
634a68bf3e * merged netbsd start
* profile for win32
2001-08-07 18:47:12 +00:00
peter
f9794d6904 * added override and virtual for constructors 2001-06-28 19:46:25 +00:00
peter
5fed44fe5d * dllprt0 stub for linux shared libs
* pass -init and -fini for linux shared libs
  * libprefix splitted into staticlibprefix and sharedlibprefix
2001-06-03 15:15:31 +00:00
peter
0c03535b5b * registration of targets and assemblers 2001-04-18 22:01:53 +00:00
peter
a7cf57524e * symtable change to classes
* range check generation and errors fixed, make cycle DEBUG=1 works
  * memory leaks fixed
2001-04-13 01:22:06 +00:00
peter
684970ea22 * merged generic m68k updates from fixes branch 2001-02-26 19:44:52 +00:00
peter
a7fe3cb6b9 * new fixfilename, findfile for unix. Look first for lowercase, then
NormalCase and last for UPPERCASE names.
2001-02-20 21:41:15 +00:00
peter
5ea6603165 * fixed searching for utils 2001-01-12 19:19:44 +00:00
peter
32b9cdb7cf + new tlinkedlist class (merge of old tstringqueue,tcontainer and
tlinkedlist objects)
2000-12-25 00:07:25 +00:00
florian
b9796f6a7f * unused units removed from uses clause
* some changes for widestrings
2000-11-29 00:30:30 +00:00
peter
24fc983597 * message updates merges 2000-09-24 21:33:46 +00:00
peter
a71e44ac49 * use defines.inc 2000-09-24 15:06:10 +00:00
peter
4003cdb728 * freebsd support merged 2000-09-16 12:22:52 +00:00
florian
6159f4535f + first implementation of Netware Module support, thanks to
Armin Diehl (diehl@nordrhein.de) for providing the patches
2000-09-11 17:00:22 +00:00
michael
632b15d6c5 + merged Patch from peter 2000-09-04 09:40:23 +00:00
peter
4c94659743 * moved some util functions from globals,cobjects to cutils
* splitted files into finput,fmodule
2000-08-27 16:11:48 +00:00
Jonas Maebe
cb8d634547 * merged from fixes branch (v_hint to v_tried changed when attempting
to smart/static/shared link)
2000-07-26 13:08:19 +00:00
michael
650fbb86aa + removed logs 2000-07-13 11:32:24 +00:00
michael
e7aca136a1 + Initial import 2000-07-13 06:29:38 +00:00
peter
b9e5501ba7 * findobjectfile gets extra arg with directory where the unit is found
and the .o should be looked first
2000-07-08 20:43:37 +00:00
Tomas Hajny
c0a5cca16b * little corrections for EMX resources 2000-06-28 03:34:06 +00:00
peter
cae5842737 * removed wrong warning for library finding 2000-05-17 18:30:35 +00:00
peter
934883569a * also allow smartlinking for main programs 2000-05-03 16:11:57 +00:00
pierre
811f471334 * partial linklib change
I could not use Pavel's code because it broke the current way
    linklib is used, which is messy :(
  + add postw32 call if external linking on win32
2000-04-14 11:16:10 +00:00
daniel
fb1a842118 * Current work of symtable integration committed. The symtable can be
activated by defining 'newst', but doesn't compile yet. Changes in type
  checking and oop are completed. What is left is to write a new
  symtablestack and adapt the parser to use it.
2000-02-28 17:23:56 +00:00
peter
2ba0ebe607 * removed warnings/notes 2000-02-24 18:41:38 +00:00
peter
4a4a24b6e8 * log truncated 2000-02-09 13:22:42 +00:00
pierre
68e4d27435 * use ./ instead of . to look into startup dir 2000-01-14 14:40:37 +00:00
peter
96ed273164 * smartlinking fixes for binary writer
* release alignreg code and moved instruction writing align to cpuasm,
    but it doesn't use the specified register yet
2000-01-12 10:38:16 +00:00
peter
6607475609 * fixed placing of .sl directories
* use -b again for base-file selection
  * fixed group writing for linux with smartlinking
2000-01-11 09:52:06 +00:00
peter
e525797c51 * updated copyright to 2000 2000-01-07 01:14:18 +00:00
pierre
8049831c3f * Give better info in script 1999-11-22 22:22:30 +00:00
peter
e169c592f8 * searchpaths changed to stringqueue object 1999-11-12 11:03:49 +00:00
peter
0887060ff2 * truncated log to 20 revs 1999-11-06 14:34:16 +00:00
peter
a905c026f2 * fixed os2 linker 1999-10-26 12:25:04 +00:00
peter
fefc839b29 * redesigned linker object
+ library support for linux (only procedures can be exported)
1999-10-21 14:29:32 +00:00
pierre
a7992b0232 * library list keeps doubles 1999-10-08 15:38:42 +00:00
florian
fbbf8a505c * m68k compiler is again compilable (only gas writer, no assembler reader) 1999-09-16 23:05:51 +00:00