Commit Graph

166 Commits

Author SHA1 Message Date
pierre
fa4b4906e6 * ogcoff.pas: Add support for RELOC_SECREL32.
* cfidwarf.pas: Fix CIE pointer inside dwarf-FDE entry which must be
    a section relative offset.

git-svn-id: trunk@16062 -
2010-09-29 12:58:21 +00:00
pierre
7c04d8d13b From patch submitted by Willibald Krenn in Bug Report 17500.
* assemble.pas (TInternalAssembler.WriteStab): Use RELOC_ABSOLUTE32 for
   32-bit stab entry.
 * ogcoff.pas: Add check for correct generated reloc section size.
 * systems/t_win.pas: Use 0x400000 image base for x86_64 programs using
   stabs debug information format.

git-svn-id: trunk@16056 -
2010-09-28 10:06:54 +00:00
florian
c1f3d8dcaa * unified names of system_*/systems_* sets
git-svn-id: trunk@14566 -
2010-01-07 18:16:20 +00:00
florian
34227e811d + patch by Sven Barth to add native NT rtl support to the compiler, resolves #14886
git-svn-id: trunk@14565 -
2010-01-07 17:42:11 +00:00
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
bf00b3e94b * Replaced some ifdef x86_64 by ifdef cpu64bitaddr, since it is more correct.
git-svn-id: trunk@13159 -
2009-05-17 12:43:58 +00:00
yury
ede93974bc * Fixed writing of external debug info when reloc section should be created.
git-svn-id: trunk@13146 -
2009-05-15 22:30:52 +00:00
yury
c4439e4e39 * Properly write 64-bit relocations into .reloc section.
* Warning when 64-bit object file contains 32-bit absolute relocations. In such case an executable image can be loaded into lower 4Gb of address space only.

git-svn-id: trunk@13110 -
2009-05-07 10:46:56 +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
yury
99917e034d * Fixed visibility notes of some overrode methods.
git-svn-id: trunk@13095 -
2009-05-04 10:24:47 +00:00
yury
9d78ca3f19 * RELOC_SECREL32 must be relative to EXE section, not to object file section.
* Write zero to relocs in debug sections, which point to unused sections, eliminated by linker.
* It seems internal linker creates correct dwarf debug info now.

git-svn-id: trunk@13093 -
2009-05-04 09:42:51 +00:00
yury
50060dfd52 * Do not assume sizeof(pint) section alignment if no alignment is specified for the section.
git-svn-id: trunk@13092 -
2009-05-04 08:27:36 +00:00
yury
070fa422b5 * Partially reverted r12648. PE flags should be set in main PE header (and it is done already). LoaderFlags in optional header are obsolete.
git-svn-id: trunk@13088 -
2009-05-03 14:43:46 +00:00
florian
442333d05f * fixed string length which makes ObjC section names fit
git-svn-id: trunk@12889 -
2009-03-14 20:26:31 +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
89d466a3dc * Fixed writing debug link for external symbols file. Bug #13041.
git-svn-id: trunk@12686 -
2009-02-05 11:44:52 +00:00
florian
a3d784b8e5 * internal coff linker takes care of min./max. stack size as well as pe flags
git-svn-id: trunk@12648 -
2009-02-01 18:22:18 +00:00
Jonas Maebe
b1c3f76ff9 * changed the supported targets for assembler writers to a set, and
(hopefully correctly) limited all assembler writers to only the
    OSes they support (mantis #11801)

git-svn-id: trunk@12622 -
2009-01-28 15:12:43 +00:00
yury
9cc15bd994 * Do not write COFF string table into EXE if COFF symbol table is not present. It fixes loading of stripped DLL on Win9x. Bug #12629.
git-svn-id: trunk@12352 -
2008-12-12 14:54:14 +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
eb9c9c77d8 * More correct fix for overflow check for RELOC_RELATIVE_24.
* Fixed 2007062701 while linking DLL.

git-svn-id: trunk@11484 -
2008-07-29 08:44:05 +00:00
yury
c92c034882 * Fixed overflow check for RELOC_RELATIVE_24.
git-svn-id: trunk@11483 -
2008-07-28 22:30:46 +00:00
yury
4cb3fef484 * Fixed executable size limit for wince.
git-svn-id: trunk@11482 -
2008-07-28 22:06:15 +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
0bcaf8845f * Fixed 'mixed signed/unsigned' warnings.
* Suppressed 2 unreachable code warnings.
* Now x86 compiler compiles without warnings and notes! It will be great to keep such state in future...

git-svn-id: trunk@11455 -
2008-07-23 13:16:46 +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
fd0ed50331 * Removed/commented more unused variables.
* Fixed some uninitialized variable warnings.

git-svn-id: trunk@11442 -
2008-07-23 10:48:53 +00:00
yury
d5a3a28379 * Set PE_FILE_LARGE_ADDRESS_AWARE flag for win64 executables to allow access more than 2GB of memory.
* Fixed $setpeflags directive. Flags should be set in main PE header. LoaderFlags in optional header are obsolete.

git-svn-id: trunk@11433 -
2008-07-22 11:53:55 +00:00
yury
fcceb9cfa1 * Removed/ifdefed/commented unused local variables.
git-svn-id: trunk@11430 -
2008-07-20 23:00:31 +00:00
yury
efb280e0e9 * Use system_wince in all places.
git-svn-id: trunk@11429 -
2008-07-20 22:39:19 +00:00
yury
0e17d9e4d9 * Use system_wince instead of [system_arm_wince,system_i386_wince].
git-svn-id: trunk@11426 -
2008-07-20 22:22:57 +00:00
yury
22df9855d9 * For some unknown reason WM 6.1 requires .idata section to be read only. Otherwise it refuses to load DLLs greater than 64KB. Earlier versions of WinCE load DLLs regardless of .idata flags.
git-svn-id: trunk@11421 -
2008-07-20 20:28:37 +00:00
florian
9e88af9a78 * support ABSOLUTE32 in the COFF writer on x86-64, resolves #10641
git-svn-id: trunk@11376 -
2008-07-13 09:10:50 +00:00
florian
cad678840e + internal linker takes care of setpeflags
git-svn-id: trunk@10499 -
2008-03-17 21:06:35 +00:00
peter
f915cbc4ca * replace constants to formal const with variables
git-svn-id: trunk@10425 -
2008-03-02 14:01:22 +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
florian
ddad44bc1e * win64 -glw build fix
git-svn-id: trunk@9817 -
2008-01-20 15:13:42 +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
yury
13d948c07b * Fixed: import Address Table should contain the same data as Import Lookup Table.
* Perform import by name with index as hint, if both import name and import index are specified.
* Fixed import by ordinal when external linker is used.
* Fixed some warnings and notes.

git-svn-id: trunk@9083 -
2007-11-02 23:07:15 +00:00
peter
488c06d275 * don't reuse emptyint
git-svn-id: trunk@8724 -
2007-10-02 18:41:07 +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
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
28f0d47d83 * Don't be too strict while reading COFF symtable if obj file does not have COFF string table (to be compatible with LD and MS linkers). It fixes bug #9175.
git-svn-id: trunk@7913 -
2007-07-01 19:57:09 +00:00
yury
04147151e4 * Fixed stabs generation for DLLs by internal assembler (use RELOC_ABSOLUTE in all cases).
* Do not generate relocs by internal linker for sections which are not loaded in memory.

git-svn-id: trunk@7829 -
2007-06-26 22:51:21 +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
73b8fba64b * fixed linking with eVC++ object files (bug #8542).
git-svn-id: trunk@7556 -
2007-06-02 22:14:35 +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