sbsv2/raptor/lib/flm/e32postlink.mk
author Zheng Shen <zheng.shen@nokia.com>
Wed, 27 Oct 2010 19:16:18 +0800
changeset 663 8e27d440923e
parent 629 541af5ee3ed9
permissions -rw-r--r--
revert to 7c11c3d8d025
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
625
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     1
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     2
# All rights reserved.
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     3
# This component and the accompanying materials are made available
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     4
# under the terms of the License "Eclipse Public License v1.0"
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     5
# which accompanies this distribution, and is available
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     7
#
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     8
# Initial Contributors:
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
     9
# Nokia Corporation - initial contribution.
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    10
#
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    11
# Contributors:
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    12
#
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    13
# Description:
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    14
# Post-linking macros for supported e32 base architectures
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    15
#
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    16
#
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    17
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    18
define e32postlink_arm
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    19
	$(POSTLINKER) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    20
	  --sid=0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0)) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    21
	  --version=$(VERSION) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    22
	  --capability=$(FINAL_CAPABILITIES) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    23
	  --linkas=$(call dblquote,$(LINKASVERSIONED)) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    24
	  --fpu=$(POSTLINKER_FPU) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    25
	  --targettype=$(POSTLINKTARGETTYPE) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    26
	  --output=$$(call dblquote,$$@) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    27
	  --elfinput=$(call dblquote,$(LINK_TARGET)) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    28
	  $(if $(UID1),--uid1=0x$(UID1),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    29
	  $(if $(UID2),--uid2=0x$(UID2),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    30
	  $(if $(UID3),--uid3=0x$(UID3),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    31
	  $(if $(VENDORID),--vid=0x$(VENDORID),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    32
	  $(if $(EXPTARGET),--customdlltarget,) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    33
	  $(if $(ARMLIBS),--excludeunwantedexports,) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    34
	  $(if $(EPOCALLOWDLLDATA),--dlldata,) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    35
	  $(if $(EPOCPROCESSPRIORITY),--priority=$(EPOCPROCESSPRIORITY),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    36
	  $(if $(EPOCSTACKSIZE),--stack=0x$(EPOCSTACKSIZE),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    37
	  $(if $(EPOCHEAPSIZEMIN),--heap=0x$(EPOCHEAPSIZEMIN)$(CHAR_COMMA)0x$(EPOCHEAPSIZEMAX),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    38
	  $(if $(EPOCFIXEDPROCESS),--fixedaddress,) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    39
	  $(if $(EPOCDATALINKADDRESS),--datalinkaddress=$(EPOCDATALINKADDRESS),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    40
	  $(if $(NAMEDSYMLKUP),--namedlookup,) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    41
	  $(if $(SMPSAFE),--smpsafe,) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    42
	  $(if $(POSTLINKDEFFILE),--definput=$(POSTLINKDEFFILE),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    43
	  $(if $(EXPORTUNFROZEN),--unfrozen,) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    44
	  $(if $(AUTOEXPORTS),--sysdef=$(call dblquote,$(AUTOEXPORTS)),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    45
	  $(if $(CANIGNORENONCALLABLE), \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    46
	    $(if $(IMPORTLIBRARYREQUIRED),,--ignorenoncallable),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    47
	  $(if $(CANHAVEEXPORTS), --defoutput=$(call dblquote,$(GENERATED_DEFFILE)) --dso=$(GENERATED_DSO)) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    48
	  $(if $(filter $(VARIANTTYPE),$(DEBUGGABLE)),--debuggable,) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    49
	  $(if $(POSTLINKER_SUPPORTS_WDP), \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    50
	    --codepaging=$(PAGEDCODE_OPTION) --datapaging=$(PAGEDDATA_OPTION), \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    51
	    $(POSTLINKER_PAGEDOPTION)) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    52
	  $(if $(NOCOMPRESSTARGET),--uncompressed, \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    53
	    $(if $(INFLATECOMPRESSTARGET),--compressionmethod=inflate, \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    54
	      $(if $(BYTEPAIRCOMPRESSTARGET),--compressionmethod=bytepair, \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    55
	        --compressionmethod=$(POSTLINKER_COMPRESSION_DEFAULT)))) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    56
	  --libpath="$(call concat,$(PATHSEP)$(CHAR_SEMIC),$(strip $(RUNTIME_LIBS_PATH) $(STATIC_LIBS_PATH)))"
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    57
endef
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    58
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    59
define e32postlink_x86
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    60
	$(POSTLINKER) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    61
	  -sid 0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0)) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    62
	  -version $(VERSION) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    63
	  -capability $(FINAL_CAPABILITIES) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    64
	  $(if $(UID1),-uid1 0x$(UID1),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    65
	  $(if $(UID2),-uid2 0x$(UID2),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    66
	  $(if $(UID3),-uid3 0x$(UID3),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    67
	  $(if $(VENDORID),-vid 0x$(VENDORID),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    68
	  $(if $(EPOCALLOWDLLDATA),-allow,) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    69
	  $(if $(EPOCPROCESSPRIORITY),-priority $(EPOCPROCESSPRIORITY),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    70
	  $(if $(EPOCSTACKSIZE),-stack 0x$(EPOCSTACKSIZE),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    71
	  $(if $(EPOCHEAPSIZEMIN),-heap 0x$(EPOCHEAPSIZEMIN) 0x$(EPOCHEAPSIZEMAX),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    72
	  $(if $(EPOCFIXEDPROCESS),-fixed,) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    73
	  $(if $(EPOCDATALINKADDRESS),-datalinkaddress $(EPOCDATALINKADDRESS),) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    74
	  $(if $(SMPSAFE),-smpsafe,) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    75
	  $(if $(POSTLINKER_SUPPORTS_WDP), \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    76
	    -codepaging $(PAGEDCODE_OPTION) -datapaging $(PAGEDDATA_OPTION), \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    77
	    $(POSTLINKER_PAGEDOPTION)) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    78
	  $(if $(NOCOMPRESSTARGET),-uncompressed, \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    79
	    $(if $(BYTEPAIRCOMPRESSTARGET),-compressionmethod bytepair, \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    80
	      -compressionmethod $(POSTLINKER_COMPRESSION_DEFAULT))) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    81
	  $(call dblquote,$(LINK_TARGET)) \
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    82
	  $$(call dblquote,$$@)
a1925fb7753a sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
diff changeset
    83
endef