Commit Graph

55 Commits

Author SHA1 Message Date
florian
53019b2470 * align code slightly better on i386-win32/x86_64-win64
git-svn-id: trunk@35224 -
2017-01-03 16:43:26 +00:00
nickysn
7ff6c2a675 - rm tf_smartlink_library from targets that define tf_smartlink_sections, since
in certain places, the code in the compiler assumes that only one of the two
  is defined, resulting in libraries with missing externals when both are
  defined and there's no much point in supporting both anyway, since section
  based smartlinking achieves the same thing (in a better way) on these
  platforms.

git-svn-id: trunk@30668 -
2015-04-19 18:47:44 +00:00
Jonas Maebe
bd203a5b57 * synchronised with trunk till r30240
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
Jeppe Johansen
9e5979e8be Implemented UAL syntax support in the ARM assembler reader. Can be toggled with a field for now, but not implemented yet. Still using pre-UAL syntax for now.
Switched codegeneration of VFPv2 and VFPv3 to use UAL mnemonics and syntax.
Updated VFP code in RTL to use UAL syntax too.
Added preliminary ELF support for ARM.
Added support for linking of WinCE COFF files. Should work for with a standard ARMv4-I target.

git-svn-id: branches/laksen/armiw@29247 -
2014-12-10 20:44:34 +00:00
Jonas Maebe
bacd303208 * synchronized with trunk up to r27758
git-svn-id: branches/hlcgllvm@27779 -
2014-05-12 16:12:34 +00:00
florian
2c5a0ffc89 * make windres the default resource compiler on x86_64-win64
git-svn-id: trunk@27041 -
2014-03-09 10:52:10 +00:00
Jonas Maebe
9573160c1a + llvmdatalayout field for tsysteminfo that contains the encoded data layout
as used by llvm for most targets (taken from clang, adapted in some cases
    where we use a custom stack alignment)

git-svn-id: branches/hlcgllvm@26032 -
2013-11-11 11:14:55 +00:00
sergei
38058505ba * Changed linking infrastructure to look like assembler one:
* Changed direct references to linker classes in TSystemInfo records to enumerated ids.
  * RegisterExtennalLinker and RegisterInternalLinker procedures replaced by single RegisterLinker procedure and moved to link.pas.
  - TAbstractLinker is no longer necessary, removed.

This change allows to register linker once per id, rather than once per target, and also allows TSystemInfo records to be read-only.

git-svn-id: trunk@25279 -
2013-08-18 12:01:21 +00:00
svenbarth
930b76e8fb Fix compilation of WinCE. Change the fixed UNICODE define of WinCE to FPC_OS_UNICODE, so that it won't be undefined when changing the mode/string type and that the usage of a UNICODE API is independant of the mode.
Also adjusted all Windows (Win32/64/CE) units to define a "UNICODE" if "FPC_OS_UNICODE" is defined (except the Jedi units).
Also the common RTL units that checked for UNICODE now check for FPC_OS_UNICODE.

git-svn-id: trunk@24420 -
2013-05-04 11:06:32 +00:00
nickysn
3a4135c07b ifdef cpu86 replaced with ifdef cpui386
git-svn-id: branches/i8086@23709 -
2013-03-07 22:21:27 +00:00
pierre
93b2c1a717 Use dwarf2 as default debug format for Win64 target OS
git-svn-id: trunk@23081 -
2012-11-29 14:20:13 +00:00
Jonas Maebe
bd31004fdb + describe for each supported target the default guaranteed stack alignment
git-svn-id: trunk@22278 -
2012-09-02 14:32:12 +00:00
florian
7819eb892c * use GNU AS as default assembler on x86_64-win64 now
git-svn-id: trunk@20740 -
2012-04-07 13:00:46 +00:00
pierre
b1bd1d29ec Replace cat $RESby $CATRES and call CatFileContent method
git-svn-id: trunk@19649 -
2011-11-18 21:33:24 +00:00
Jonas Maebe
f2823a1d68 * r17629 changed the condition for generating safecall code on x64 and ARM
platforms from testing for a Windows target into testing to the
    tf_safecall_exceptions target flag. However, this flag was not set for
    non-i386 Windows platforms (mantis #20385)

git-svn-id: trunk@19486 -
2011-10-14 16:11:46 +00:00
pierre
ec99b1ba40 * Add tf_dwarf_only_local_labels for win64 as suggested by Willibald Krenn
git-svn-id: trunk@16151 -
2010-10-13 08:52:35 +00:00
joost
65ab1e820b * Safecall on linux/i386 now behaves like cdecl plus hidden exception support.
* Adapted tests because safecall on linux/i386 now does not include high() 
   support anymore

git-svn-id: trunk@15913 -
2010-08-27 19:07:22 +00:00
Jonas Maebe
b4c8c73e70 * changed tf_use_function_relative_addresses into an assembler flag (with
the opposite meaning, af_stabs_use_function_absolute_addresses), because it
    is different on Darwin for the internal and external assembler)

git-svn-id: trunk@14342 -
2009-12-06 13:21:28 +00:00
Jonas Maebe
c9af7d6476 * added tf_dwarf_only_local_labels for Windows (should make DWARF usable
on Windows, although there are still some warnings)

git-svn-id: trunk@12909 -
2009-03-17 17:07:17 +00:00
Jonas Maebe
bfd753b7c9 - removed tf_dwarf_relative_addresses again, it causes differences
compared to the gcc-generated code (and removing it does not cause
    other differences). Partial revert of r12592.

git-svn-id: trunk@12904 -
2009-03-16 17:20:04 +00:00
Tomas Hajny
54f3d28ce8 * prefix for import libraries now configurable rather than hardcoded, plus fixed issue with name of OS/2 import libraries
git-svn-id: trunk@12727 -
2009-02-09 00:01:15 +00:00
Jonas Maebe
0768f82770 * set tf_dwarf_relative_addresses for win32
* switch to external assembler when using dwarf debug info for win32,
    because the internal assembler doesn't work with
    tf_dwarf_relative_addresses
   (mantis #12872)

git-svn-id: trunk@12592 -
2009-01-25 13:24:02 +00:00
florian
24fe46b3a3 + missing includes of fpcdefs.inc added
git-svn-id: trunk@11916 -
2008-10-18 14:07:42 +00:00
michael
174de3eab1 Merged revisions 9693-10480 via svnmerge from
svn+ssh://svn.freepascal.org/FPC/svn/fpc/branches/resources

........
  r9694 | michael | 2008-01-09 21:31:18 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Initial check-in
........
  r9695 | michael | 2008-01-09 21:35:58 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New version from Giulio Bernardi
........
  r9697 | michael | 2008-01-09 21:41:54 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Patch from Giulio Bernardi with resource support
........
  r9698 | michael | 2008-01-09 21:46:33 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Patch from Giulio Bernardi to add more resource testing
........
  r9699 | michael | 2008-01-09 21:57:26 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New tool from Giulio Bernardi
........
  r9700 | michael | 2008-01-09 21:58:23 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New tool from Giulio Bernardi
........
  r9701 | michael | 2008-01-09 22:01:54 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Added fcl-res
........
  r9702 | michael | 2008-01-09 22:01:58 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Added fcl-res
........
  r9703 | michael | 2008-01-10 08:54:26 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * Fixed double code
........
  r9704 | jonas | 2008-01-10 10:59:20 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    - removed duplicate code
........
  r9705 | jonas | 2008-01-10 11:25:21 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    + added missing fcl-res dependencies
........
  r9706 | jonas | 2008-01-10 11:58:30 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    + dependencies for fpintres and fpextres
........
  r9707 | yury | 2008-01-10 12:47:51 +0100 (Thu, 10 Jan 2008) | 3 lines
  
  * Fixed compilation of resource, which is included in a unit located in different folder than main source.
  * .res files must be copied to units output folder, otherwise .res files will not be found when only compiled units path is available and compiler does not know anything about sources folder.
  * Improved resource related error messages.
........
  r9708 | michael | 2008-01-10 12:52:13 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * Removed double source after end.
........
  r9709 | michael | 2008-01-10 12:52:48 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * No longer needed
........
  r9710 | tom_at_work | 2008-01-10 22:09:08 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * properly align FPC_RESLOCATION so that linking does not fail on some architectures (e.g. ppc64)
........
  r9711 | tom_at_work | 2008-01-10 23:53:12 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * fix splitting of 64 bit load/stores from/to unaligned memory locations into multiple load/stores, which in some cases generated wrong code
........
  r9712 | michael | 2008-01-11 11:00:08 +0100 (Fri, 11 Jan 2008) | 1 line
  
  * Fixed bug in BSS section on 64-bit platforms
........
  r9720 | giulio | 2008-01-12 10:02:04 +0100 (Sat, 12 Jan 2008) | 1 line
  
  Updated fcl-res documentation: occurrences of reslib changed to fcl-res.
........
  r9740 | giulio | 2008-01-13 19:36:44 +0100 (Sun, 13 Jan 2008) | 3 lines
  
   - Don't try to compile resources on systems with a non windows-like resource support.
   - Don't add the .or file to the list of object files if resource compiling failed.
........
  r10201 | giulio | 2008-02-04 11:35:44 +0100 (Mon, 04 Feb 2008) | 5 lines
  
  * resource compiling supported on OS/2 via wrc
  * CompileResourceFiles and CollectResourceFiles don't do target-specific checks anymore
  * refactored a bit
........
  r10389 | giulio | 2008-02-25 21:32:52 +0100 (Mon, 25 Feb 2008) | 2 lines
  
  Deleted test file which was committed by mistake
........
  r10472 | giulio | 2008-03-10 12:22:18 +0100 (Mon, 10 Mar 2008) | 2 lines
  
  changed define FPC_HAS_RESOURCES to FPC_HAS_WINLIKERESOURCES
........

git-svn-id: trunk@10481 -
2008-03-12 21:33:48 +00:00
florian
e5a960d860 * set default reserved stack size on win32/win64 to 16MB
git-svn-id: trunk@10330 -
2008-02-15 19:06:23 +00:00
florian
90af7ebf72 * use only windows exceptions for stack checking on win32/win64, resolves #9166
git-svn-id: trunk@9020 -
2007-10-31 23:19:48 +00:00
peter
9f0ca44c94 * new tf_smartlink_library flag
* use create_smartlink[_sections|_library] to check what to 
    do for smartlinking

git-svn-id: trunk@8715 -
2007-10-01 16:55:08 +00:00
florian
5e60b52f28 * ignore pic directive/switch if the platform doesn't support pic, resolves #9281
git-svn-id: trunk@8157 -
2007-07-23 20:25:04 +00:00
yury
787aac7478 * Patch from Vincent to enable resources support for win64 using gorc resource compiler.
git-svn-id: trunk@7921 -
2007-07-02 11:02:30 +00:00
Jonas Maebe
4c1d540a21 * changed cpurequiresproperalignment from a compile-time define into
a target flag, since some kernels may be able to handle alignment
    problems, and the alignment requirements may not be absolute (e.g. on
    ppc64, only 8 byte values need alignment, and only to 4 byte boundaries)
   -> linux/ppc64 has tf_requires_proper_alignment set in its target flags,
      darwin/ppc64 hasn't

git-svn-id: trunk@6745 -
2007-03-06 16:10:56 +00:00
yury
1044e84ea3 * fixed i386-wince flags.
* enabled internal linker for i386-wince.

git-svn-id: trunk@5742 -
2006-12-29 20:50:43 +00:00
peter
55f9758c25 * only add resext if no extension was specified
* default resext for windows changed to .res

git-svn-id: trunk@5193 -
2006-11-03 08:51:23 +00:00
yury
0fcb76dc89 * cprefix is empty for arm-wince.
git-svn-id: trunk@4076 -
2006-07-02 14:05:58 +00:00
yury
76cab9e3c0 * Removed tf_winlikewidestring flag for wince target. Currently it causes problems.
git-svn-id: trunk@3754 -
2006-05-31 12:49:15 +00:00
oro06
dcd973801f +UNICODE default define for wince
git-svn-id: trunk@3744 -
2006-05-30 07:48:37 +00:00
florian
d5008742e5 + tf_smartlink_sections set for arm-wince
git-svn-id: trunk@3547 -
2006-05-16 13:11:52 +00:00
florian
2f2c3c09fc * MS-C uses no _ prefix for symbols on win64
git-svn-id: trunk@3475 -
2006-05-11 08:11:15 +00:00
florian
ab1660c9c2 + tf_winlikewidestring
git-svn-id: trunk@3457 -
2006-05-08 18:20:26 +00:00
florian
9d42d1986c * corrected record alignment on wince
git-svn-id: trunk@3363 -
2006-04-29 16:26:54 +00:00
peter
efe41b0766 * fixed section smartlinking with ld.exe
* reference debugstart and debugend sections

git-svn-id: trunk@3127 -
2006-04-02 20:18:38 +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
florian
f5d790f9b6 * i386 uses dwarf cfi info on linux/win32, so even when omitting the stack frame, trace backs in gdb are correct
git-svn-id: trunk@2316 -
2006-01-21 14:30:57 +00:00
peter
abc49206fc * section smartlink for win32 added, disabled by default because ld.exe
ignores the --gc-sections for pe-i38

git-svn-id: trunk@2305 -
2006-01-16 10:50:02 +00:00
florian
d525a3b162 + set WINDOWS define on all Windows platforms (Win32,Win64,WinCE)
git-svn-id: trunk@2291 -
2006-01-15 11:00:35 +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
florian
61e3b70cfa * cleaned up segmented thread variables
git-svn-id: trunk@2135 -
2006-01-03 12:49:29 +00:00
florian
27f28eec1a * use 16 byte procedure alignment on windows too
git-svn-id: trunk@1962 -
2005-12-15 19:50:58 +00:00
florian
11e087e212 + fixed some alignment settings
git-svn-id: trunk@1563 -
2005-10-22 15:40:36 +00:00
peter
fdc4925fcd * basic framework for debuginfo class added
git-svn-id: trunk@1084 -
2005-09-15 08:34:51 +00:00