(error) read-only small data overflow in GHS compiler

冷暖自知 提交于 2020-01-14 14:51:07

问题


I'm using GHS compiler. I get this error message when trying to build my project.

Click to see: elxr Linker error

[elxr] (error) read-only small data overflow: (signed) didn't fit in 16 bits while performing relocation.

Update: The output of MULTI IDE after adding # and -v

[elxr] (warning) section .NOINIT_RAM_UNSPECIFIED from Port_Ram.o isn't included by the section map;
  appending after last section.
  add to section map or use -append to append without warning

[elxr] (warning) section .PORT_CFG_DATA_UNSPECIFIED from Port_PBcfg.o isn't included by the section map;
  appending after last section.
  add to section map or use -append to append without warning

[elxr] (warning) section .PORT_CFG_DBTOC_UNSPECIFIED from Port_PBcfg.o isn't included by the section map;
  appending after last section.
  add to section map or use -append to append without warning

[elxr] (warning) section .CONST_ROM_UNSPECIFIED from Port_Hardware.o isn't included by the section map;
  appending after last section.
  add to section map or use -append to append without warning

[elxr] (warning) section .PORT_PUBLIC_CODE_ROM from Port.o isn't included by the section map;
  appending after last section.
  add to section map or use -append to append without warning

[elxr] (warning) section .PORT_PRIVATE_CODE_ROM from Port.o isn't included by the section map;
  appending after last section.
  add to section map or use -append to append without warning

 Cleaning output\example
Building output\example
Assembling dr7f701587_startup.850 because dr7f701587_startup.o does not exist
Compiling App_PORT_F1K_Sample.c because App_PORT_F1K_Sample.o does not exist
Compiling Dem.c because Dem.o does not exist
Compiling Port.c because Port.o does not exist
Compiling Port_Hardware.c because Port_Hardware.o does not exist
Compiling Port_PBcfg.c because Port_PBcfg.o does not exist
Compiling Port_Ram.c because Port_Ram.o does not exist
Compiling Port_Version.c because Port_Version.o does not exist
Output from Assembling dr7f701587_startup.850:
C:\ghs\comp_201355\ecom800.exe --option=70 -Z848 -Z752 -X722 -X682 -X735 -X780 \
        -Z1715 -X1165 --c --gnu=safe -Z1835 --diag_warning=223 \
        --diag_warning=1547,1791 -Z1840 --config \
        t,t,l,,2,4,4,8,4,2,4,4,8,4,8,32,4,8,8,4,8,8,-1,f,f,-1,i,ui,1,f,t,1,1,8,1,8,72,4,6,f,3,0,0 \
        --option=30 --option=40 --option=147 --gnu_version=40300 -$ -X70 \
        -X1532 -X1602 -X540 --option=124 --alternative_tokens \
        --diag_remark=667,1546 --pragma_diag_level=warn \
        --display_error_number -Z1672 -Z298 -Z295 -X4856 -Z78 -X947 -Z3535 \
        -X3536 -Z479 -Z1250 -X3362 -X2867 -X2869 -X2868 -X4166 --long_long \
        -Z1208 -Z445 -X777 -Z1526 -X1312 -cpu=rh850g3k -Z942 -Z941 -Z1254 \
        -Z1354 -X1271 -Z1682 -X857 -Z4145 -Z4601 -Z4423 -Z4839 -Z4881 -Z4882 \
        -Z1106 -X1264 -X1558 -Z1562 -Z1563 -Z3978 -Z538 -Z1585 -X529 -X1752 \
        -Z3233 -Z4293 -X509 -Z3909 -Z4129 -Z4130 -Z4895 -X4989 -X5098 -X5099 \
        -Z5018 -X4995 --option=142 -OM --option=87 --option=88 \
        -D__PROTOTYPES__ -D__STDC__=0 -D__STDC_HOSTED__=1 \
        -D__STDC_VERSION__=199409L -D__ATTRIBUTES -D__EDG__ -D__ghs -D__ghs__ \
        -D__SoftwareFloat -D__SoftwareFloat__ -D__SoftwareDouble \
        -D__SoftwareDouble__ -D__ghs_asm=2 -D__ELF -D__ELF__ \
        -D__CORE_V850E3V5__ -D__CORE_V850E2V3__ -D__CORE_V850E2R__ \
        -D__CORE_V850E2__ -D__CORE_V850E__ -D__CORE_V850__ -D__V850E \
        -D__V850E__ -D__V850E2 -D__V850E2__ -D__V850E2R -D__V850E2R__ \
        -D__V850E2RV3 -D__V850E2RV3__ -D__V850E2V3 -D__V850E2V3__ -D__V850E3 \
        -D__V850E3__ -D__V850E3V5 -D__V850E3V5__ -D__RH850 -D__RH850__ \
        -D__V850 -D__V850__ -D__RH850G3K__ -D__RH850G3K \
        -D__V800_registermode=32 -D__V800_registermode__=32 \
        -D__RH850_FPU_VERSION=3 -D__RH850_FPU_VERSION__=3 -D__V800 -D__V800__ \
        -D__v850 -D__v851__ -D__v850e__ -D__ghs_alignment=8 \
        -D__ghs_max_pack_value=8 -D__ghs_sda -D__ghs_zda -D__LittleEndian \
        -D__LittleEndian__ -D__LITTLE_ENDIAN__ -D__IeeeFloat -D__IeeeFloat__ \
        -D__Char_Is_Signed__ -D__SIGNED_CHARS__ -D__Ptr_Is_Unsigned__ \
        -D__Field_Is_Signed__ -D__Enum_Field_Is_Signed__ -D__Int_Is_32 \
        -D__Long_Is_32 -D__LL_Is_64 -D__Ptr_Is_32 -D__CHAR_BIT=8 \
        -D__SHRT_BIT=16 -D__INT_BIT=32 -D__LONG_BIT=32 -D__WCHAR_BIT=32 \
        -D__TIME_T_BIT=32 -D__PTR_BIT=32 -D__FUNCPTR_BIT=32 -D__TIME_T_BIT=32 \
        -D__LL_BIT=64 -D__LLONG_BIT=64 -D__MAX_BIT=64 -D__LDBL_BIT=64 \
        -D__LDBL_SIZE=8 -D__REG_BIT=32 -D__FREG_BIT=32 -D__Reg_Is_32 \
        -D__WChar_Is_Signed__ -D__WChar_Is_Long__ \
        -D__GHS_Inline_String_Functions -D__GHS_Inline_Memory_Functions \
        -D__ghs_board_is_v800_generic -Idevice \
        -IC:\ghs\comp_201355\include\v800 -IC:\ghs\comp_201355\ansi -X1189 \
        -X1610 -X1116 -X1875 -X614 -D__ASSEMBLER__ -D__LANGUAGE_ASM \
        -D__LANGUAGE_ASM__ -E --option=98 --option=214 \
        --gh_oname=output\objects\dr7f701587_startup.o -M \
        --gh_md=output\objects\dr7f701587_startup.d --option=-62 -o \
        C:\Users\chfakht\AppData\Local\Temp\gh_00007rg1.s \
        device\dr7f701587_startup.850
C:\ghs\comp_201355\ease850.exe -w -elf -b0 -Idevice \
        -IC:\ghs\comp_201355\lib\rh850 -cg_underscore -cpu=rh850g3k -nofpu \
        -no_v850_simd -source=device\dr7f701587_startup.850 \
        --gh_oname=output\objects\dr7f701587_startup.o \
        --gh_md_append=output\objects\dr7f701587_startup.d -o \
        output\objects\gh_00007rg1.o -list=output\list\dr7f701587_startup.lst \
        C:\Users\chfakht\AppData\Local\Temp\gh_00007rg1.s
move output\objects\gh_00007rg1.o output\objects\dr7f701587_startup.o
rm -f C:\Users\chfakht\AppData\Local\Temp\gh_00007rg1.s
Compiling SchM_Port.c because SchM_Port.o does not exist
Output from Compiling App_PORT_F1K_Sample.c:
C:\ghs\comp_201355\ecom800.exe --option=70 -Z848 -X4593 -Z752 -X722 -X682 \
        -X735 -X780 -Z1715 -X1165 --c --gnu=safe -Z1835 --diag_warning=223 \
        --diag_warning=1547,1791 -Z1840 --config \
        t,t,l,,2,4,4,8,4,2,4,4,8,4,8,32,4,8,8,4,8,8,-1,f,f,-1,i,ui,1,f,t,1,1,8,1,8,72,4,6,f,3,0,0 \
        --option=27 --option=30 --option=40 --option=147 --gnu_version=40300 \
       SAME AS PREVIOUS (Removed because body limit caraccters are 40000)

        source\App_PORT_F1K_Sample.c
C:\ghs\comp_201355\ease850.exe -w -elf -b0 -Idevice \
        -IC:\ghs\comp_201355\lib\rh850 -cg_underscore -cpu=rh850g3k -nofpu \
        -no_v850_simd -nomacro \
        -patch_dbo=C:\GHS_Projects\output\objects\App_PORT_F1K_Sample.dbo \
        -source=App_PORT_F1K_Sample.c -o output\objects\gh_00004j81.o \
        -list=output\list\App_PORT_F1K_Sample.lst \
        C:\Users\chfakht\AppData\Local\Temp\gh_00004j81.s
move output\objects\gh_00004j81.o output\objects\App_PORT_F1K_Sample.o
rm -f C:\Users\chfakht\AppData\Local\Temp\gh_00004j81.s
Output from Compiling SchM_Port.c:
C:\ghs\comp_201355\ecom800.exe --option=70 -Z848 -X4593 -Z752 -X722 -X682 \
        -X735 -X780 -Z1715 -X1165 --c --gnu=safe -Z1835 --diag_warning=223 \
        --diag_warning=1547,1791 -Z1840 --config \
    t,t,l,,2,4,4,8,4,2,4,4,8,4,8,32,4,8,8,4,8,8,-1,f,f,-1,i,ui,1,f,t,1,1,8,1,8,72,4,6,f,3,0,0 \
        --option=27 --option=30 --option=40 --option=147 --gnu_version=40300 \
        -$ -X70 -X1532 -X1602 -X540 --option=124 --alternative_tokens \
        --ghs_xref=1 --diag_remark=667,1546 --pragma_diag_level=warn \
        --display_error_number -Z1672 -Z298 -Z295 -X4856 -Z78 -X947 -Z3535 \
        -X3536 -Z479 -Z1250 -X3362 -X2867 -X2869 -X2868 -X4166 --long_long \
        -Z1208 -Z445 -X777 -Z1526 -X1312 -cpu=rh850g3k -Z942 -Z941 -Z1254 \
        -Z1354 -X1271 -Z1682 -X857 -Z4145 -Z4601 -Z4423 -Z4839 -Z4881 -Z4882 \
        -Z1106 -X1264 -X1558 -Z1562 -Z1563 -Z3978 -Z538 -Z1585 -X529 -X1752 \
        -Z3233 -Z4293 -X509 -Z3909 -Z4129 -Z4130 -Z4895 -X4989 -X5098 -X5099 \
        -Z5018 -X4995 --option=142 -OM -D__PROTOTYPES__ -D__STDC__=0 \
        -D__STDC_HOSTED__=1 -D__STDC_VERSION__=199409L -D__ATTRIBUTES \
        -D__EDG__ -D__ghs -D__ghs__ -D__SoftwareFloat -D__SoftwareFloat__ \
        -D__SoftwareDouble -D__SoftwareDouble__ -D__ghs_asm=2 -D__ELF \
        -D__ELF__ -D__CORE_V850E3V5__ -D__CORE_V850E2V3__ -D__CORE_V850E2R__ \
        -D__CORE_V850E2__ -D__CORE_V850E__ -D__CORE_V850__ -D__V850E \
        -D__V850E__ -D__V850E2 -D__V850E2__ -D__V850E2R -D__V850E2R__ \
        -D__V850E2RV3 -D__V850E2RV3__ -D__V850E2V3 -D__V850E2V3__ -D__V850E3 \
        -D__V850E3__ -D__V850E3V5 -D__V850E3V5__ -D__RH850 -D__RH850__ \
        -D__V850 -D__V850__ -D__RH850G3K__ -D__RH850G3K \
        -D__V800_registermode=32 -D__V800_registermode__=32 \
        -D__RH850_FPU_VERSION=3 -D__RH850_FPU_VERSION__=3 -D__V800 -D__V800__ \
        -D__v850 -D__v851__ -D__v850e__ -D__ghs_alignment=8 \
        -D__ghs_max_pack_value=8 -D__ghs_sda -D__ghs_zda -D__LittleEndian \
        -D__LittleEndian__ -D__LITTLE_ENDIAN__ -D__IeeeFloat -D__IeeeFloat__ \
        -D__Char_Is_Signed__ -D__SIGNED_CHARS__ -D__Ptr_Is_Unsigned__ \
        -D__Field_Is_Signed__ -D__Enum_Field_Is_Signed__ -D__Int_Is_32 \
        -D__Long_Is_32 -D__LL_Is_64 -D__Ptr_Is_32 -D__CHAR_BIT=8 \
        -D__SHRT_BIT=16 -D__INT_BIT=32 -D__LONG_BIT=32 -D__WCHAR_BIT=32 \
        -D__TIME_T_BIT=32 -D__PTR_BIT=32 -D__FUNCPTR_BIT=32 -D__TIME_T_BIT=32 \
        -D__LL_BIT=64 -D__LLONG_BIT=64 -D__MAX_BIT=64 -D__LDBL_BIT=64 \
        -D__LDBL_SIZE=8 -D__REG_BIT=32 -D__FREG_BIT=32 -D__Reg_Is_32 \
        -D__WChar_Is_Signed__ -D__WChar_Is_Long__ \
        -D__GHS_Inline_String_Functions -D__GHS_Inline_Memory_Functions \
        -D__ghs_board_is_v800_generic -Idevice \
        -IC:\ghs\comp_201355\include\v800 -IC:\ghs\comp_201355\ansi -g -X1361 \
        -X1189 -X1610 -X1936 -X1116 -X1875 -X614 -D__LANGUAGE_C \
        -D__LANGUAGE_C__ -M --output_dir output\objects \
        -sym=C:\GHS_Projects\output\objects\Dem.dbo \
        -M --gh_md=output\objects\Dem.d --gh_oname=output\objects\Dem.o \
        --gh_out C:\Users\chfakht\AppData\Local\Temp\gh_00006681.s \
        source\Dem.c
C:\ghs\comp_201355\ease850.exe -w -elf -b0 -Idevice \
        -IC:\ghs\comp_201355\lib\rh850 -cg_underscore -cpu=rh850g3k -nofpu \
        -no_v850_simd -nomacro \
        -patch_dbo=C:\GHS_Projects\output\objects\Dem.dbo \
        -source=Dem.c -o output\objects\gh_00006681.o \
        -list=output\list\Dem.lst \
        C:\Users\chfakht\AppData\Local\Temp\gh_00006681.s
move output\objects\gh_00006681.o output\objects\Dem.o
rm -f C:\Users\chfakht\AppData\Local\Temp\gh_00006681.s
Output from Compiling Port.c:
C:\ghs\comp_201355\ecom800.exe --option=70 -Z848 -X4593 -Z752 -X722 -X682 \
        -X735 -X780 -Z1715 -X1165 --c --gnu=safe -Z1835 --diag_warning=223 \
        --diag_warning=1547,1791 -Z1840 --config \
        t,t,l,,2,4,4,8,4,2,4,4,8,4,8,32,4,8,8,4,8,8,-1,f,f,-1,i,ui,1,f,t,1,1,8,1,8,72,4,6,f,3,0,0 \
        --option=27 --option=30 --option=40 --option=147 --gnu_version=40300 \
        -$ -X70 -X1532 -X1602 -X540 --option=124 --alternative_tokens \
        --ghs_xref=1 --diag_remark=667,1546 --pragma_diag_level=warn \
        --display_error_number -Z1672 -Z298 -Z295 -X4856 -Z78 -X947 -Z3535 \
        -X3536 -Z479 -Z1250 -X3362 -X2867 -X2869 -X2868 -X4166 --long_long \
        -Z1208 -Z445 -X777 -Z1526 -X1312 -cpu=rh850g3k -Z942 -Z941 -Z1254 \
        -Z1354 -X1271 -Z1682 -X857 -Z4145 -Z4601 -Z4423 -Z4839 -Z4881 -Z4882 \
        -Z1106 -X1264 -X1558 -Z1562 -Z1563 -Z3978 -Z538 -Z1585 -X529 -X1752 \
        -Z3233 -Z4293 -X509 -Z3909 -Z4129 -Z4130 -Z4895 -X4989 -X5098 -X5099 \
        -Z5018 -X4995 --option=142 -OM -D__PROTOTYPES__ -D__STDC__=0 \
        -D__STDC_HOSTED__=1 -D__STDC_VERSION__=199409L -D__ATTRIBUTES \
        -D__EDG__ -D__ghs -D__ghs__ -D__SoftwareFloat -D__SoftwareFloat__ \
        -D__SoftwareDouble -D__SoftwareDouble__ -D__ghs_asm=2 -D__ELF \
        -D__ELF__ -D__CORE_V850E3V5__ -D__CORE_V850E2V3__ -D__CORE_V850E2R__ \
        -D__CORE_V850E2__ -D__CORE_V850E__ -D__CORE_V850__ -D__V850E \
        -D__V850E__ -D__V850E2 -D__V850E2__ -D__V850E2R -D__V850E2R__ \
        -D__V850E2RV3 -D__V850E2RV3__ -D__V850E2V3 -D__V850E2V3__ -D__V850E3 \
        -D__V850E3__ -D__V850E3V5 -D__V850E3V5__ -D__RH850 -D__RH850__ \
        -D__V850 -D__V850__ -D__RH850G3K__ -D__RH850G3K \
        -D__V800_registermode=32 -D__V800_registermode__=32 \
        -D__RH850_FPU_VERSION=3 -D__RH850_FPU_VERSION__=3 -D__V800 -D__V800__ \
        -D__v850 -D__v851__ -D__v850e__ -D__ghs_alignment=8 \
        -D__ghs_max_pack_value=8 -D__ghs_sda -D__ghs_zda -D__LittleEndian \
        -D__LittleEndian__ -D__LITTLE_ENDIAN__ -D__IeeeFloat -D__IeeeFloat__ \
        -D__Char_Is_Signed__ -D__SIGNED_CHARS__ -D__Ptr_Is_Unsigned__ \
        -D__Field_Is_Signed__ -D__Enum_Field_Is_Signed__ -D__Int_Is_32 \
        -D__Long_Is_32 -D__LL_Is_64 -D__Ptr_Is_32 -D__CHAR_BIT=8 \
        -D__SHRT_BIT=16 -D__INT_BIT=32 -D__LONG_BIT=32 -D__WCHAR_BIT=32 \
        -D__TIME_T_BIT=32 -D__PTR_BIT=32 -D__FUNCPTR_BIT=32 -D__TIME_T_BIT=32 \
        -D__LL_BIT=64 -D__LLONG_BIT=64 -D__MAX_BIT=64 -D__LDBL_BIT=64 \
        -D__LDBL_SIZE=8 -D__REG_BIT=32 -D__FREG_BIT=32 -D__Reg_Is_32 \
        -D__WChar_Is_Signed__ -D__WChar_Is_Long__ \
        -D__GHS_Inline_String_Functions -D__GHS_Inline_Memory_Functions \
        -D__ghs_board_is_v800_generic -Idevice \
        -IC:\ghs\comp_201355\include\v800 -IC:\ghs\comp_201355\ansi -g -X1361 \
        -X1189 -X1610 -X1936 -X1116 -X1875 -X614 -D__LANGUAGE_C \
        -D__LANGUAGE_C__ -M --output_dir output\objects \
        -sym=C:\GHS_Projects\output\objects\Port.dbo \
        -M --gh_md=output\objects\Port.d --gh_oname=output\objects\Port.o \
        --gh_out C:\Users\chfakht\AppData\Local\Temp\gh_000029s1.s \
        source\Port.c
C:\ghs\comp_201355\ease850.exe -w -elf -b0 -Idevice \
        -IC:\ghs\comp_201355\lib\rh850 -cg_underscore -cpu=rh850g3k -nofpu \
        -no_v850_simd -nomacro \
        -patch_dbo=C:\GHS_Projects\output\objects\Port.dbo \
        -source=Port.c -o output\objects\gh_000029s1.o \
        -list=output\list\Port.lst \
        C:\Users\chfakht\AppData\Local\Temp\gh_000029s1.s
move output\objects\gh_000029s1.o output\objects\Port.o
rm -f C:\Users\chfakht\AppData\Local\Temp\gh_000029s1.s
Output from Compiling Port_Hardware.c:
C:\ghs\comp_201355\ecom800.exe --option=70 -Z848 -X4593 -Z752 -X722 -X682 \
        -X735 -X780 -Z1715 -X1165 --c --gnu=safe -Z1835 --diag_warning=223 \
        --diag_warning=1547,1791 -Z1840 --config \
        t,t,l,,2,4,4,8,4,2,4,4,8,4,8,32,4,8,8,4,8,8,-1,f,f,-1,i,ui,1,f,t,1,1,8,1,8,72,4,6,f,3,0,0 \
        --option=27 --option=30 --option=40 --option=147 --gnu_version=40300 \
        -$ -X70 -X1532 -X1602 -X540 --option=124 --alternative_tokens \
        SAME AS PREVIOUS (Removed because body limit caraccters are 40000)
        -D__WChar_Is_Signed__ -D__WChar_Is_Long__ \
        -D__GHS_Inline_String_Functions -D__GHS_Inline_Memory_Functions \
        -D__ghs_board_is_v800_generic -Idevice \
        -IC:\ghs\comp_201355\include\v800 -IC:\ghs\comp_201355\ansi -g -X1361 \
        -X1189 -X1610 -X1936 -X1116 -X1875 -X614 -D__LANGUAGE_C \
        -D__LANGUAGE_C__ -M --output_dir output\objects \
        -sym=C:\GHS_Projects\output\objects\Port_Hardware.dbo \
        -M --gh_md=output\objects\Port_Hardware.d \
        --gh_oname=output\objects\Port_Hardware.o --gh_out \
        C:\Users\chfakht\AppData\Local\Temp\gh_00007ns1.s \
        source\Port_Hardware.c
C:\ghs\comp_201355\ease850.exe -w -elf -b0 -Idevice \
        -IC:\ghs\comp_201355\lib\rh850 -cg_underscore -cpu=rh850g3k -nofpu \
        -no_v850_simd -nomacro \
        -patch_dbo=C:\GHS_Projects\output\objects\Port_Hardware.dbo \
        -source=Port_Hardware.c -o output\objects\gh_00007ns1.o \
        -list=output\list\Port_Hardware.lst \
        C:\Users\chfakht\AppData\Local\Temp\gh_00007ns1.s
move output\objects\gh_00007ns1.o output\objects\Port_Hardware.o
rm -f C:\Users\chfakht\AppData\Local\Temp\gh_00007ns1.s
Output from Compiling Port_PBcfg.c:
C:\ghs\comp_201355\ecom800.exe --option=70 -Z848 -X4593 -Z752 -X722 -X682 \
        -X735 -X780 -Z1715 -X1165 --c --gnu=safe -Z1835 --diag_warning=223 \
        --diag_warning=1547,1791 -Z1840 --config \
        t,t,l,,2,4,4,8,4,2,4,4,8,4,8,32,4,8,8,4,8,8,-1,f,f,-1,i,ui,1,f,t,1,1,8,1,8,72,4,6,f,3,0,0 \
         SAME AS PREVIOUS (Removed because body limit caraccters are 40000)
        -IC:\ghs\comp_201355\include\v800 -IC:\ghs\comp_201355\ansi -g -X1361 \
        -X1189 -X1610 -X1936 -X1116 -X1875 -X614 -D__LANGUAGE_C \
        -D__LANGUAGE_C__ -M --output_dir output\objects \
        -sym=C:\GHS_Projects\output\objects\Port_PBcfg.dbo \
        -M --gh_md=output\objects\Port_PBcfg.d \
        --gh_oname=output\objects\Port_PBcfg.o --gh_out \
        C:\Users\chfakht\AppData\Local\Temp\gh_00004g41.s source\Port_PBcfg.c
C:\ghs\comp_201355\ease850.exe -w -elf -b0 -Idevice \
        -IC:\ghs\comp_201355\lib\rh850 -cg_underscore -cpu=rh850g3k -nofpu \
        -no_v850_simd -nomacro \
        -patch_dbo=C:\GHS_Projects\output\objects\Port_PBcfg.dbo \
        -source=Port_PBcfg.c -o output\objects\gh_00004g41.o \
        -list=output\list\Port_PBcfg.lst \
        C:\Users\chfakht\AppData\Local\Temp\gh_00004g41.s
move output\objects\gh_00004g41.o output\objects\Port_PBcfg.o
rm -f C:\Users\chfakht\AppData\Local\Temp\gh_00004g41.s
Output from Compiling Port_Ram.c:
C:\ghs\comp_201355\ecom800.exe --option=70 -Z848 -X4593 -Z752 -X722 -X682 \
        -X735 -X780 -Z1715 -X1165 --c --gnu=safe -Z1835 --diag_warning=223 \
        --diag_warning=1547,1791 -Z1840 --config \
        t,t,l,,2,4,4,8,4,2,4,4,8,4,8,32,4,8,8,4,8,8,-1,f,f,-1,i,ui,1,f,t,1,1,8,1,8,72,4,6,f,3,0,0 \
        --option=27  
         SAME AS PREVIOUS (Removed because body limit caraccters are 40000)
        -X1189 -X1610 -X1936 -X1116 -X1875 -X614 -D__LANGUAGE_C \
        -D__LANGUAGE_C__ -M --output_dir output\objects \
        -sym=C:\GHS_Projects\output\objects\Port_Ram.dbo \
        -M --gh_md=output\objects\Port_Ram.d \
        --gh_oname=output\objects\Port_Ram.o --gh_out \
        C:\Users\chfakht\AppData\Local\Temp\gh_00007l81.s source\Port_Ram.c
C:\ghs\comp_201355\ease850.exe -w -elf -b0 -Idevice \
        -IC:\ghs\comp_201355\lib\rh850 -cg_underscore -cpu=rh850g3k -nofpu \
        -no_v850_simd -nomacro \
        -patch_dbo=C:\GHS_Projects\output\objects\Port_Ram.dbo \
        -source=Port_Ram.c -o output\objects\gh_00007l81.o \
        -list=output\list\Port_Ram.lst \
        C:\Users\chfakht\AppData\Local\Temp\gh_00007l81.s
move output\objects\gh_00007l81.o output\objects\Port_Ram.o
rm -f C:\Users\chfakht\AppData\Local\Temp\gh_00007l81.s
Output from Compiling Port_Version.c:
C:\ghs\comp_201355\ecom800.exe --option=70 -Z848 -X4593 -Z752 -X722 -X682 \
        -X735 -X780 -Z1715 -X1165 --c --gnu=safe -Z1835 --diag_warning=223 \
        --diag_warning=1547,1791 -Z1840 --config \
        t,t,l,,2,4,4,8,4,2,4,4,8,4,8,32,4,8,8,4,8,8,-1,f,f,-1,i,ui,1,f,t,1,1,8,1,8,72,4,6,f,3,0,0 \
        --option=27 --option=30 --option=40 --option=147 --gnu_version=40300 \
        -$ -X70 -X1532 -X1602 -X540 --option=124 --alternative_tokens \
         SAME AS PREVIOUS (Removed because body limit caraccters are 40000)
        -X1189 -X1610 -X1936 -X1116 -X1875 -X614 -D__LANGUAGE_C \
        -D__LANGUAGE_C__ -M --output_dir output\objects \
        -sym=C:\GHS_Projects\output\objects\Port_Version.dbo \
        -M --gh_md=output\objects\Port_Version.d \
        --gh_oname=output\objects\Port_Version.o --gh_out \
        C:\Users\chfakht\AppData\Local\Temp\gh_000063k1.s \
        source\Port_Version.c
C:\ghs\comp_201355\ease850.exe -w -elf -b0 -Idevice \
        -IC:\ghs\comp_201355\lib\rh850 -cg_underscore -cpu=rh850g3k -nofpu \
        -no_v850_simd -nomacro \
        -patch_dbo=C:\GHS_Projects\output\objects\Port_Version.dbo \
        -source=Port_Version.c -o output\objects\gh_000063k1.o \
        -list=output\list\Port_Version.lst \
        C:\Users\chfakht\AppData\Local\Temp\gh_000063k1.s
move output\objects\gh_000063k1.o output\objects\Port_Version.o
rm -f C:\Users\chfakht\AppData\Local\Temp\gh_000063k1.s
Linking example because it does not exist
Output from Linking example.gpj:
gmemfile: fatal: unable to open input file 'output/example'
Output from Linking example.gpj:
gsrec: fatal: unable to open input file 'output/example'
Output from Linking example.gpj:
gsrec: fatal: unable to open input file 'output/example'
Output from Linking example.gpj:
C:\ghs\comp_201355\elxr.exe -T device\dr7f701587.ld -map -Mxa -callgraph \
        -nochecksum -unweak=___gh_float_scanf -wchar_s32 -farcallpatch \
        -argcheck=none -Qn -e _RESET -LC:\ghs\comp_201355\lib\rh850 \
        C:\ghs\comp_201355\lib\rh850\crt0.o \
        output\objects\dr7f701587_startup.o \
        output\objects\App_PORT_F1K_Sample.o output\objects\Dem.o \
        output\objects\Port.o output\objects\Port_Hardware.o \
        output\objects\Port_PBcfg.o output\objects\Port_Ram.o \
        output\objects\Port_Version.o output\objects\SchM_Port.o -lmulti \
        -lfmalloc -lwchar_s32 -lansi -lwc_s32 -lmath_sf -lind_sf -lstartup \
        -lsys -larch -o output\example --gh_md=output\example.dep
C:\ghs\comp_201355\gnm.exe -s output\example > C:\Users\chfakht\AppData\Local\Temp\gh_00003301.nm
C:\ghs\comp_201355\dblink.exe -dbopath=output\objects -a -nm=gnm \
        C:\Users\chfakht\AppData\Local\Temp\gh_00003301.nm -o \
        output\example.dnm -top_project \
        C:\GHS_Projects\example.gpj \
        -Dscope.tools_dir=C:\ghs\comp_201355 \
        -Dscope.target=v800/generic/standalone -Dscope.processor=800 \
        -Dscope.cpuname=rh850g3k -Dscope.fputype=soft \
        -Dscope.deflibdir=C:\ghs\comp_201355\lib\rh850 \
        C:\ghs\comp_201355\lib\rh850\crt0.dbo \
        C:\ghs\comp_201355\lib\rh850\libmulti.dba \
        C:\ghs\comp_201355\lib\rh850\libfmalloc.dba \
        C:\ghs\comp_201355\lib\rh850\libwchar_s32.dba \
        C:\ghs\comp_201355\lib\rh850\libansi.dba \
        C:\ghs\comp_201355\lib\rh850\libwc_s32.dba \
        C:\ghs\comp_201355\lib\rh850\libmath_sf.dba \
        C:\ghs\comp_201355\lib\rh850\libind_sf.dba \
        C:\ghs\comp_201355\lib\rh850\libstartup.dba \
        C:\ghs\comp_201355\lib\rh850\libsys.dba \
        C:\ghs\comp_201355\lib\rh850\libarch.dba
C:\ghs\comp_201355\gsize.exe -gcompare -table -commons output\example > output\example.siz
rm -f C:\Users\chfakht\AppData\Local\Temp\gh_00003301.nm
Error: build failed
Build failed (Mon Oct 24 09:10:45 2016)

Update 2:

I found this in a GHS manual but for arm where the same message error appear

Customizing the Run-Time Environment Program Sections This section describes the special program sections that are created for and maintained by the Green Hills run-time environment system (the libraries libsys.a and libstartup.a and the module crt0.o). These sections appear in all the default linker directives files provided with your distribution, and their contents are generated automatically, so you should not explicitly add to them: • .fixaddr, .fixtype — These sections are created by the compiler. These two sections contain information that enables the Green Hills startup code to relocate PIC/PID initializers of data variables. The compiler automatically generates data in the .fixaddr and .fixtype sections, if needed, when using PIC and/or PID. The default Green Hills run-time libraries may also already have information in these sections because many of these libraries are always built with PIC and PID. These two sections contain read-only data and can be placed in ROM. Failure to include these sections in the linker directives file may cause them to be added to the end of the section list by the Green Hills linker, which can then emit the following warning message: [elxr] warning: section .fixaddr from libsys.a(ind_crt1.o) isn’t included by the section map (as .fixaddr); appending after last section add to section map or use -append to append without warning If the program depends on dynamic memory expanding past the end of the last specified section in a section map, having sections appended to the section map might be fatal because they can be overwritten. Therefore, these sections should be included in section maps.

Is it related to the compiler itself ? or due to some options i have used ? Any help will be appreciated. Thanks.

来源:https://stackoverflow.com/questions/40174361/error-read-only-small-data-overflow-in-ghs-compiler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!