Commit Graph

91 Commits

Author SHA1 Message Date
Jonas Maebe
edacea82be * changed assembler directives for darwin lazy/non-lazy symbol pointers
and init/fini routines into their section equivalents (based on patch
    by Dmitry Boyarintsev, mantis #15037)

git-svn-id: trunk@14128 -
2009-11-09 22:20:01 +00:00
Jonas Maebe
0c675a4039 * the objc1 unit has been renamed to objc
* the objc unit links against the Foundation instead of against the Cocoa
    framework, and inludes an interface to either the fragile or non-fragile
    obj-c run time depending on the target platform
  + support for the non-fragile Objective-C runtime/ABI, as used on Mac OS X
    for ARM (iPhone) 64 bit (PowerPC/64, x86_64) -- all these targets now
    are now also supported for the objectivec1 modeswitch
  + support for private_extern symbol bindings, required for the above
  * mark objcclasses that are declared in the implementation section of a
    unit as "hidden" (not sure what the effect is, since the Objective-C
    runtime does not seem to do anything with this flag)
  * enabled all obj-c tests for the newly supported platforms

git-svn-id: branches/objc@13763 -
2009-09-27 15:24:50 +00:00
yury
5cd83b26d9 * More proper check for executable image size limits.
* Proper handling of 64-bit COFF relocations.
* Use jumps with 32-bit relative addressing in imports on win64.
* This fixes are related to bug #13657. The bug is not fully fixed yet...

git-svn-id: trunk@13104 -
2009-05-06 18:07:07 +00:00
Jonas Maebe
6165536b5e + added {$modeswitch objectivec1}/-Mobjectivec1 mode switch to enable
the use of Objective-C 1.0 constructs. Because it is a mode switch, it
    can be used cumulatively with every syntax mode. Note that a {$mode xxx}
    statement resets all mode switches as well, so you cannot use the
    -Mobjectivec1 variant if you have such a statement in a unit. This
    modeswitch is currently only enabled for Darwin/PowerPC and Darwin/i386,
    as the backend support is not yet implemented for other platforms.
  + implemented selector() statement that can be used to create an Objective-C
    selector for the message with the specified *constant* name (in the future,
    it will also work for Objective-C method identifiers)
  + added SEL type to the system unit (the selector() statement returns it)
  + added all Objective-C segments to the assembler writers
  + (currently mostly dummy) objc1 unit that is automatically included if the
    {$modeswitch objectivec1} statement is used
  + some tests for the selector() statement

git-svn-id: trunk@12870 -
2009-03-08 18:40:32 +00:00
yury
afa7ade545 * Replace ? and @ in external names only if the external is imported from DLL on Windows.
Also @ character is allowed in symbol names by GNU AS for x86.

git-svn-id: trunk@12842 -
2009-03-01 12:24:53 +00:00
Károly Balogh
049280bc21 * fix bug #8391 only for arm-wince, because otherwise it breaks other platforms (incl. i386-win32)
git-svn-id: trunk@11871 -
2008-10-09 18:37:56 +00:00
yury
23da33b75a * Fixed hang while linking in some cases.
git-svn-id: trunk@11508 -
2008-08-03 21:19:33 +00:00
yury
4cabbe0e39 * Fixed compiler cycling with enabled range and overflow checking.
git-svn-id: trunk@11489 -
2008-07-29 21:11:03 +00:00
yury
c84aa860bd * Added error message if resulting executable image size is too big to fit in memory. bug #11702.
git-svn-id: trunk@11481 -
2008-07-28 21:54:18 +00:00
yury
5e11e697b4 * Use unsigned integers for sizes and positions to break 2GB limit in tdynamicarray, object writer, internal linker, coff and PE headers.
git-svn-id: trunk@11480 -
2008-07-28 20:29:25 +00:00
yury
491f0fa1d8 * Replaced all user defined warnings by TODO comments to reduce compiler noise.
git-svn-id: trunk@11443 -
2008-07-23 11:00:03 +00:00
yury
403ce8c2c1 * Fixed removing stabs for unused functions. It fixes debugging problems.
git-svn-id: trunk@10963 -
2008-05-13 13:12:07 +00:00
Jonas Maebe
f36e5411af * split cpu64bit compiler define into
a) cpu64bitaddr, which means that we are generating a compiler which
       will generate code for targets with a 64 bit address space/abi
    b) cpu64bitalu, which means that we are generating a compiler which
       will generate code for a cpu with support for 64 bit integer
       operations (possibly running in a 32 bit address space, depending
       on the cpu64bitaddr define)
   All cpus which had cpu64bit set now have both the above defines set,
   and none of the 32 bit cpus have cpu64bitalu set (and none will
   compile with it currently)
  + pint and puint types, similar to aint/aword (not pword because that
    that conflicts with pword=^word)
  * several changes from aint/aword to pint/pword
  * some changes of tcgsize2size[OS_INT] to sizeof(pint)

git-svn-id: trunk@10320 -
2008-02-13 20:44:00 +00:00
peter
793fd8fc09 * Add -Xg to help pages
* -Xg now produces a .dbg file with debuginfo
    that can be used by gdb. The main executable gets
    a debuglink section that references the .dbg file.

git-svn-id: trunk@9778 -
2008-01-17 01:20:37 +00:00
Jonas Maebe
0bf43d223b * fixed uses of custom-length string types in function/property
result types

git-svn-id: trunk@9486 -
2007-12-17 13:36:30 +00:00
peter
c767df348f * idata must be aligned on 4 bytes to prevent a corrupt
idata2 section where the entries are always 20 bytes

git-svn-id: trunk@8725 -
2007-10-02 18:41:47 +00:00
Jonas Maebe
70c2414daa * split off sec_rodata_norel from sec_rodata, and only put constant data
without relocations in sec_rodata_norel. It should be possible to make
    this new section read-only on all platforms, although currently it
    is only done for darwin, and for non-pic code written using the
    -Aas assembler writer.

    Most platforms also have a special section for "constant but with
    relocations" data, but such a section is currently only used for
    Darwin (others still use plain .data sections for that, like they
    did before)

git-svn-id: trunk@8650 -
2007-09-26 15:49:01 +00:00
florian
4151029ee5 + .fini section support
git-svn-id: trunk@8174 -
2007-07-28 08:40:10 +00:00
yury
84306f80e9 * fixed tw8391.pp for i386.
git-svn-id: trunk@7768 -
2007-06-21 23:22:48 +00:00
yury
38b8731ba0 * Restored relocs generation for dlls by internal linker. It fixes bug #9048.
* It is possible to generate relocs for exe with internal linker using -WB switch.

git-svn-id: trunk@7743 -
2007-06-20 15:47:10 +00:00
yury
df36385c89 * fixed mantis #8887. (please merge to fixes).
git-svn-id: trunk@7356 -
2007-05-16 09:04:34 +00:00
yury
821c91c230 * fix Mantis #8760: do not put actually empty sections in executable by internal linker.
* .bss section no longer required by internal linker.

git-svn-id: trunk@7316 -
2007-05-12 13:32:52 +00:00
yury
b2605b8ff6 * Internal linker now correctly links to gcc import libraries. It fixes win32 IDE with debugger support.
git-svn-id: trunk@7278 -
2007-05-05 19:21:30 +00:00
pierre
115d95004f * try to fix cygwin import lib problem in internal linker
git-svn-id: trunk@7270 -
2007-05-04 22:49:56 +00:00
Jonas Maebe
21f87ef1de * fixed instances of passing properties as var parameter
git-svn-id: trunk@7249 -
2007-05-03 11:02:38 +00:00
peter
29ffdefacb * secrel32 relocation support required by dwarf2 under windows
git-svn-id: trunk@7172 -
2007-04-25 09:06:36 +00:00
yury
7547f3a0c0 * Allow @ and ? characters in imported function name when AS is used. It fixes bug #8391.
+ test.

git-svn-id: trunk@6669 -
2007-02-26 17:51:38 +00:00
peter
9f3de7e809 * -Xg generates a separate file with the debug info sections
git-svn-id: trunk@6628 -
2007-02-24 15:06:31 +00:00
peter
30e78b71c8 * fix IE after duplicate asm symbol
git-svn-id: trunk@5992 -
2007-01-15 17:45:01 +00:00
florian
c238bb15d1 * .init section support
git-svn-id: trunk@5835 -
2007-01-07 10:03:52 +00:00
yury
d8d25c2489 * fixed memory leaks in compiler.
git-svn-id: trunk@5369 -
2006-11-14 09:32:58 +00:00
peter
f21f055373 * change hashobjectlist.Delete() calls to :=nil now that the .Delete() behaviour
is changed

git-svn-id: trunk@5365 -
2006-11-13 22:04:21 +00:00
yury
5f484a0f14 * section "fpc" was renamed to ".fpc".
* compiler version string is stored in .fpc.version section.
* debug start/end links are stored in .fpc.links section.
* fixed linking with eVC++ object files by internal linker.
* .fpc.links section is removed by internal linker before writing executable, because it is no longer needed.

git-svn-id: trunk@5305 -
2006-11-10 10:33:41 +00:00
yury
11fcbcc663 * properly align common symbols.
git-svn-id: trunk@5264 -
2006-11-06 00:22:33 +00:00
yury
a993ddbe5c * removed dbgstabs usage.
git-svn-id: trunk@5253 -
2006-11-05 20:49:15 +00:00
yury
4e3c5e202a * Internal linker sorts only .idata section and removes stabs of unused functions. It seems all debug info problems with internal linker are solved now.
* Properly arrange arm-wince exception sections.

git-svn-id: trunk@5249 -
2006-11-05 17:13:31 +00:00
peter
4df4a4f7d1 * dynamic growth of blocks in tdynamicarray
* revert to old expand algorithms for fplist 

git-svn-id: trunk@5204 -
2006-11-03 13:44:44 +00:00
peter
5cd8775d38 * show only totals for memdebug
git-svn-id: trunk@5196 -
2006-11-03 11:24:02 +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
peter
070b86a512 * order of named sections added
* fix debugstart and debugend labels

git-svn-id: trunk@5098 -
2006-10-30 22:34:22 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
71665dbc4c * initial addr_pic support for x86_64 binary writer
git-svn-id: trunk@4848 -
2006-10-10 18:36:41 +00:00
micha
d704af7216 fix compilation for {$T+} linux/win
git-svn-id: trunk@4794 -
2006-10-04 20:43:55 +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
yury
5aef17adae * Internal linker now creates .reloc section for DLLs.
git-svn-id: trunk@4046 -
2006-07-01 21:45:54 +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
yury
01edb71190 * internal linker removes imports referenced by unused code.
git-svn-id: trunk@3832 -
2006-06-09 20:57:48 +00:00
yury
550626ef34 - Removed need of assembler startup files for wince. Now compiler directly creates .pdata section needed for arm-wince exception handling.
git-svn-id: trunk@3764 -
2006-06-02 08:36:25 +00:00
yury
2bf89e2040 * Internal linker support for wince.
git-svn-id: trunk@3712 -
2006-05-27 22:49:22 +00:00