Commit Graph

948 Commits

Author SHA1 Message Date
nickysn
3e2248f41a + implemented exporting of functions for the win16 target
git-svn-id: trunk@31842 -
2015-09-27 00:48:35 +00:00
Jonas Maebe
7c594b0288 + added support for using Clang as an assembler, and make it the default
for all non-ppc(32/64) Darwin platforms
   o pass the macosx-version-min/iphoneos-version-min to clang as an assembler,
     so that it properly sets this information starting with Xcode 7 (solves
     errors when targeting the iOS simulator, and warnings about object files
     being compiled for a different OS X version when targeting (Mac) OS X)
   o the old assembler is still selectable via -Aas-darwin (required with
     Xcode 3.1.x and older)
   o since the first Xcode version that shipped with Clang is Xcode 3.2, which
     is available for Mac OS X 10.6, most users should not encounter any issues
     with the new default (in fact, it fixes some tests for x86 because Clang
     supports some instructions that "as" doesn't). Clang does not support
     Stabs however, so -gs does require the use of -Aas-darwin

git-svn-id: trunk@31830 -
2015-09-25 18:31:54 +00:00
Jonas Maebe
8155d759dc - reverted r31806, it breaks building on non-Darwin (mantis #28716)
git-svn-id: trunk@31807 -
2015-09-24 06:44:12 +00:00
Jonas Maebe
c0b451e788 - removed as_darwin, since there is no difference with as_gas (there is no
GNU as from binutils for Darwin, and Apple's "as" is based on an old
    version of GNU as)
   o this will not cause any backward compatibility problems, as the
     previous identifier for as_darwin was "AS-Darwin" and the compiler
     compared the uppercase value of the -A parameter to the identifier,
     so it was not explicitly selectable earlier. The new name is "AS",
     so it is explicitly selectable via -Aas like on other platforms.

git-svn-id: trunk@31806 -
2015-09-23 21:25:38 +00:00
Jonas Maebe
f05d573391 * changed default debug format for Darwin/i386 from Stabs to DWARF2, as the
oldcctools are no longer shipped with Xcode 7 and Clang assembler doesn't
    support Stabs (and DWARF2 has been working better than Stabs since a long
    time already)

git-svn-id: trunk@31774 -
2015-09-22 12:55:59 +00:00
yury
11a9ff4a43 * Removed unused vars for mipsel compiler.
git-svn-id: trunk@31745 -
2015-09-17 15:46:30 +00:00
yury
432248cbf1 * Removed lot of unused vars.
git-svn-id: trunk@31732 -
2015-09-17 12:48:58 +00:00
yury
840803772c * arm-android: Enable PIC by default.
git-svn-id: trunk@31704 -
2015-09-15 18:22:24 +00:00
Jonas Maebe
4564bffb85 * use binutils 2.19+ linker script "augmentation" functionality to specify
how the fpc sections have to be linked *on Linux*. This prevents the
    "did you forget -T" warnings from ld, and in general is more correct than
    our previous approach of specifying a complete linker script without -T
    and hoping that there won't be any unexpected interactions with ld's
    built-in linker script (fixed version of r31664, thanks to Alan Modra)
   o use the new -X9 command line option to generate linker scripts that
     are compatible with binutils older than 2.19 (reverts to the old
     behaviour)

git-svn-id: trunk@31675 -
2015-09-14 07:24:54 +00:00
Jonas Maebe
e06a759e20 - reverted r31664, it causes crashes with some ld versions :/
git-svn-id: trunk@31670 -
2015-09-13 20:14:46 +00:00
Jonas Maebe
cd41bf672c * use binutils 2.19+ linker script "augmentation" functionality to specify
how the fpc sections have to be linked *on Linux*. This prevents the
    "did you forget -T" warnings from ld, and in general is more correct than
    our previous approach of specifying a complete linker script without -T
    and hoping that there won't be any unexpected interactions with ld's
    built-in linker script
   o use the new -X9 command line option to generate linker scripts that
     are compatible with binutils older than 2.19 (reverts to the old
     behaviour)

git-svn-id: trunk@31664 -
2015-09-13 19:06:14 +00:00
nickysn
d579c45656 * pass the option "dosseg" to wlink when compiling for win16 to ensure the
proper segment ordering

git-svn-id: trunk@31613 -
2015-09-12 00:08:23 +00:00
nickysn
e323a08b20 + also write the omf special segment attributes in the nasm writer for the win16 target
+ enabled the internal omf obj writer for the win16 target

git-svn-id: trunk@31576 -
2015-09-07 22:26:14 +00:00
nickysn
bdfd23cc2e + new target switch "FarProcsPushOddBP", which causes the i8086 compiler to push
odd values of BP if the procedure is far. Enabled this by default for Win16.

git-svn-id: trunk@31569 -
2015-09-07 19:05:18 +00:00
nickysn
4b80bc958c + set the win16 local heap size in the executable
git-svn-id: trunk@31552 -
2015-09-06 13:52:22 +00:00
nickysn
393d86a2e5 + implemented writing proper win16 dll import libraries
git-svn-id: trunk@31532 -
2015-09-05 13:45:23 +00:00
nickysn
839ab714cc + started implementing a win16 target :)
git-svn-id: trunk@31521 -
2015-09-05 02:47:42 +00:00
nickysn
97f65d350d + position the 'FAR_DATA' segments after the 'CODE' segments and before the
regular 'DATA' segments

git-svn-id: trunk@31498 -
2015-09-03 17:57:27 +00:00
nickysn
4061628ffb * the i8086-msdos default code segment (in near code memory models) renamed
'_TEXT'. This name is used in object modules, produced by Borland C and Open
  Watcom.

git-svn-id: trunk@31482 -
2015-09-02 13:14:12 +00:00
Jonas Maebe
4f38317bd2 * fixed small linker script syntax error in r31459
git-svn-id: trunk@31460 -
2015-08-30 15:45:57 +00:00
Jonas Maebe
6d29ad44f7 * always use a minimal linker script when we are not using -T, so that the
chance of conflicts with the built-in linkerscript is minimised
   o removed special case for AArch64 which that already
   o check the diff without whitespace changes, most is indentation

git-svn-id: trunk@31459 -
2015-08-30 15:25:44 +00:00
Jonas Maebe
6bb430e97c * also use the ARM/EABI linker script when targeting armhf
git-svn-id: trunk@31451 -
2015-08-29 13:00:03 +00:00
Jonas Maebe
882421a3ad * also use -T when cross-compiling a shared library using a sysroot on
Linux (we want to replace the entire built-in linker script in that case)

git-svn-id: trunk@31450 -
2015-08-29 12:26:12 +00:00
Jonas Maebe
e391a37b30 * add the sysrootpath to the path of the dynamic linker in the INPUT()
section for Linux

git-svn-id: trunk@31449 -
2015-08-29 12:26:08 +00:00
Jonas Maebe
3f9f498e0d - removed leftover alpha, ia64 and vis code
git-svn-id: trunk@31446 -
2015-08-28 22:31:29 +00:00
Jonas Maebe
0d74e4f719 * changed paratargetdbg from a global variable into a field of toption
git-svn-id: trunk@31443 -
2015-08-28 22:31:17 +00:00
nickysn
0894ede9cd + enable the i8086-msdos internal linker
git-svn-id: trunk@31417 -
2015-08-25 01:32:46 +00:00
nickysn
6665cec157 * put the startup code first also when using the internal linker in i8086 far
code memory models

git-svn-id: trunk@31402 -
2015-08-24 21:13:57 +00:00
nickysn
ea27b97f3a * fixed the order of the _NULL and _AFTERNULL segments
git-svn-id: trunk@31395 -
2015-08-24 18:14:55 +00:00
nickysn
d7f08866e5 * use the TMZExeOutput.MZFlatContentSection property in TInternalLinkerMsDos.GetTotalSizeForSegmentClass
instead of finding the exe section by name

git-svn-id: trunk@31387 -
2015-08-24 15:09:35 +00:00
marco
f59b88f6f8 * Add support for libraries with C linking under Haiku
Patch by Olivier, mantis #28558

git-svn-id: trunk@31362 -
2015-08-22 12:23:15 +00:00
nickysn
eed7e3aa6b + implemented GetCode/Data/BssSize in the i8086-msdos internal linker
git-svn-id: trunk@31351 -
2015-08-20 21:11:09 +00:00
nickysn
ebde434255 * specify the proper segment ordering in the link script of the i8086-msdos
internal linker

git-svn-id: trunk@31341 -
2015-08-18 14:44:00 +00:00
nickysn
0dab94e35d * i8086-msdos internal linker: put the static libraries in a group, to enable
multiple passes when resolving symbols

git-svn-id: trunk@31338 -
2015-08-18 13:37:57 +00:00
nickysn
ef207475fd + parse omf modend records and add symbol for module start address
git-svn-id: trunk@31324 -
2015-08-14 15:42:43 +00:00
nickysn
e1298a035c * provide msdos-specific dummy overrides for GetCode/Data/BssSize to avoid crash
when using the (not yet finished) internal linker

git-svn-id: trunk@31323 -
2015-08-14 14:36:18 +00:00
nickysn
d4a4b9a57b * refactored the internal linker ar object reader object creation to allow using
different 'ar' implementations under different platforms
* use the omflib reader instead of the ar reader in the msdos internal linker

git-svn-id: trunk@31322 -
2015-08-14 13:52:45 +00:00
Jeppe Johansen
2b80d46492 Added STM32F7xx controller units and types.
git-svn-id: trunk@31257 -
2015-07-31 22:21:16 +00:00
Jeppe Johansen
55669f62b1 Added most AVR controllers.
Made absolutevarsym use PUint instead of AWord for its offset to fix range errors.

git-svn-id: trunk@31242 -
2015-07-29 21:01:21 +00:00
florian
4d3552943d * correctly write OUTPUT_ARCH to the linker script, resolves issue #28395
git-svn-id: trunk@31236 -
2015-07-27 19:49:00 +00:00
pierre
014d2f805d Use /libexec/ld-elf.so.2 as dynamic linker for DragonFly OS
git-svn-id: trunk@31210 -
2015-07-14 21:59:23 +00:00
Károly Balogh
0d1c85a095 Amiga-likes: support unit_env environment variable for unit paths
git-svn-id: trunk@31180 -
2015-06-29 21:42:40 +00:00
Károly Balogh
a5abd4acd7 AROS/x86_64: fixed resources to use res_elf, set default stacksize for the more sensible 1MB instead of 8MB
git-svn-id: trunk@31179 -
2015-06-29 21:30:53 +00:00
Károly Balogh
02b9b1743e AROS/x86_64: fixed linker support by removing duplicated code and unifying it with i386
git-svn-id: trunk@31178 -
2015-06-29 21:28:51 +00:00
Jonas Maebe
acd88cac92 * fixed selection of startup code files for all iOS and simulator targets
o in particular fixes linking for the iPhoneSimulator 8.3 and later on
     i386

git-svn-id: trunk@31045 -
2015-06-13 22:47:53 +00:00
Jeppe Johansen
ab9c8bb569 Fixed startup assembler code for the case where there's no data in .bss and/or in .data.
Fixed _stack_top symbol calculation so it works for all controllers.
Added ATTINY2313 controller.

git-svn-id: trunk@31031 -
2015-06-13 12:30:50 +00:00
Károly Balogh
21329e6606 Amiga: enable using of external resources we have no internal resource support yet for Amiga Hunk executables
git-svn-id: trunk@31007 -
2015-06-07 18:07:06 +00:00
Károly Balogh
8a09c5f40d MorphOS: register ELF resources info
git-svn-id: trunk@31004 -
2015-06-07 17:37:22 +00:00
Károly Balogh
8e3ebb87cd use res_elf on MorphOS for resources
git-svn-id: trunk@31003 -
2015-06-07 16:42:32 +00:00
Jeppe Johansen
db6093023b Fixed initialization code for MK20D7 controllers.
Added flash configuration section to RTL and linker script.

git-svn-id: trunk@30972 -
2015-06-02 22:59:03 +00:00