Closed eproxus closed 4 years ago
mallopt seems to be a Linux function. I didn't find it in Posix:
http://man7.org/linux/man-pages/man3/mallopt.3.html
It seems that newlib at least knows it. It's declared in malloc.h.
But to be honest: I never needed that function and I don't know whether we support it in RTEMS. It sounds like a lot of fine grained stuff about how an allocation is done could be controlled by the application. @sebhub: Do we support that?
This function is not supported by RTEMS.
:+1: Okay, thanks for the information. Then I'll have a look at why the Erlang build system detects it as available.
After some more digging our theory is that the configure script creates a test program with a main function that tries to call mallopt
. When this compiles it is optimised away by the RTEMS compiler and the test is seen as successful.
Do you know if there is any way to control the compiler so that main
functions are included (without having to "manually" edit the test program that configure generates)?
Could you please look into the configure log to check which program code is used for the check, is it only compiled or also linked, does it use the same compiler flags as used later to build the library objects?
We did not succeed to extract the source code (its not included in config.log) but it is linked for sure (seeing it from the command line).
Hypothethis: main() is not called and therefore removed by the linker so linking doesn't fail
We also tried linking rtemsdefaultconfig but that didn't make a difference.
Do you know a trick how we could provoke linking of main() from the command line (one that doesn't hurt later when we actually build since the same flags are used there of course)
More digging and hacking exposed the failing program:
conftest.c
Compiled with the following command line:
$ /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/bin/arm-rtems5-gcc --pipe -B /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/arm-rtems5/imx7/lib -specs bsp_specs -qrtems -o conftest -fno-common -MT imx7 -MD -MP -MF imx7.d -Wall -Wextra -Wconversion -Wformat-security -Wformat=2 -Wshadow -Wcast-qual -Wcast-align -Wredundant-decls -Wstrict-prototypes -Wbad-function-cast -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a7 -O2 -g -ffunction-sections -fdata-sections -I/Users/user/GRiSP/test/_grisp/otp/22.3.3/build/erts/arm-unknown-rtems5 -fno-tree-copyrename -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a7 -O2 -g -ffunction-sections -fdata-sections -Wl,--gc-sections -Wl,-Map,imx7.map -qnolinkcmds conftest.c -lm -lgrisp -lbsd -lrtemsdefaultconfig
conftest.c:222:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
char mallopt ();
^~~~
conftest.c:231:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
main ()
^~~~
/Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld: warning: cannot find entry symbol _start; defaulting to 000000000000800c
This generated
imx7.map
Discarded input sections
.text 0x0000000000000000 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crti.o
.data 0x0000000000000000 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crti.o
.bss 0x0000000000000000 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crti.o
.data 0x0000000000000000 0x4 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtbegin.o
.text 0x0000000000000000 0x0 /var/folders/kv/m3kq2vyj5zz4mmb1yn6t82gw0000gn/T//ccHGQQJk.o
.data 0x0000000000000000 0x0 /var/folders/kv/m3kq2vyj5zz4mmb1yn6t82gw0000gn/T//ccHGQQJk.o
.bss 0x0000000000000000 0x0 /var/folders/kv/m3kq2vyj5zz4mmb1yn6t82gw0000gn/T//ccHGQQJk.o
.text.startup.main
0x0000000000000000 0x8 /var/folders/kv/m3kq2vyj5zz4mmb1yn6t82gw0000gn/T//ccHGQQJk.o
.debug_info 0x0000000000000000 0x5b /var/folders/kv/m3kq2vyj5zz4mmb1yn6t82gw0000gn/T//ccHGQQJk.o
.debug_abbrev 0x0000000000000000 0x55 /var/folders/kv/m3kq2vyj5zz4mmb1yn6t82gw0000gn/T//ccHGQQJk.o
.debug_aranges
0x0000000000000000 0x20 /var/folders/kv/m3kq2vyj5zz4mmb1yn6t82gw0000gn/T//ccHGQQJk.o
.debug_ranges 0x0000000000000000 0x10 /var/folders/kv/m3kq2vyj5zz4mmb1yn6t82gw0000gn/T//ccHGQQJk.o
.debug_line 0x0000000000000000 0x3d /var/folders/kv/m3kq2vyj5zz4mmb1yn6t82gw0000gn/T//ccHGQQJk.o
.debug_str 0x0000000000000000 0x163 /var/folders/kv/m3kq2vyj5zz4mmb1yn6t82gw0000gn/T//ccHGQQJk.o
.comment 0x0000000000000000 0x48 /var/folders/kv/m3kq2vyj5zz4mmb1yn6t82gw0000gn/T//ccHGQQJk.o
.debug_frame 0x0000000000000000 0x28 /var/folders/kv/m3kq2vyj5zz4mmb1yn6t82gw0000gn/T//ccHGQQJk.o
.text 0x0000000000000000 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtend.o
.data 0x0000000000000000 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtend.o
.bss 0x0000000000000000 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtend.o
.text 0x0000000000000000 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtn.o
.data 0x0000000000000000 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtn.o
.bss 0x0000000000000000 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtn.o
Memory Configuration
Name Origin Length Attributes
*default* 0x0000000000000000 0xffffffffffffffff
Linker script and memory map
LOAD /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crti.o
LOAD /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtbegin.o
LOAD /var/folders/kv/m3kq2vyj5zz4mmb1yn6t82gw0000gn/T//ccHGQQJk.o
LOAD /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/lib/thumb/armv7-a/neon/hard/libm.a
LOAD /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/arm-rtems5/imx7/lib/libgrisp.a
LOAD /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/arm-rtems5/imx7/lib/libbsd.a
LOAD /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/arm-rtems5/imx7/lib/librtemsdefaultconfig.a
START GROUP
LOAD /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/libgcc.a
START GROUP
LOAD /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/arm-rtems5/imx7/lib/librtemsbsp.a
LOAD /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/arm-rtems5/imx7/lib/librtemscpu.a
LOAD /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/libatomic.a
LOAD /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/lib/thumb/armv7-a/neon/hard/libc.a
LOAD /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/libgcc.a
END GROUP
END GROUP
LOAD /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtend.o
LOAD /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtn.o
[!provide] PROVIDE (__executable_start = SEGMENT_START ("text-segment", 0x8000))
0x0000000000008000 . = SEGMENT_START ("text-segment", 0x8000)
.interp
*(.interp)
.note.gnu.build-id
*(.note.gnu.build-id)
.hash
*(.hash)
.gnu.hash
*(.gnu.hash)
.dynsym
*(.dynsym)
.dynstr
*(.dynstr)
.gnu.version
*(.gnu.version)
.gnu.version_d
*(.gnu.version_d)
.gnu.version_r
*(.gnu.version_r)
.rel.dyn 0x0000000000008000 0x0
*(.rel.init)
*(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
*(.rel.fini)
*(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
*(.rel.data.rel.ro .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*)
*(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
*(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
*(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
*(.rel.ctors)
*(.rel.dtors)
*(.rel.got)
*(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
[!provide] PROVIDE (__rel_iplt_start = .)
*(.rel.iplt)
.rel.iplt 0x0000000000008000 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtbegin.o
[!provide] PROVIDE (__rel_iplt_end = .)
.rela.dyn 0x0000000000008000 0x0
*(.rela.init)
*(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
*(.rela.fini)
*(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
*(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
*(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
*(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
*(.rela.ctors)
*(.rela.dtors)
*(.rela.got)
*(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
[!provide] PROVIDE (__rela_iplt_start = .)
*(.rela.iplt)
[!provide] PROVIDE (__rela_iplt_end = .)
.rel.plt
*(.rel.plt)
.rela.plt
*(.rela.plt)
.init 0x0000000000008000 0xc
*(SORT_NONE(.init))
.init 0x0000000000008000 0x4 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crti.o
0x0000000000008000 _init
.init 0x0000000000008004 0x8 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtn.o
.plt
*(.plt)
.iplt 0x000000000000800c 0x0
*(.iplt)
.iplt 0x000000000000800c 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtbegin.o
.text 0x000000000000800c 0xa8
*(.text.unlikely .text.*_unlikely .text.unlikely.*)
*(.text.exit .text.exit.*)
*(.text.startup .text.startup.*)
*(.text.hot .text.hot.*)
*(SORT_BY_NAME(.text.sorted.*))
*(.text .stub .text.* .gnu.linkonce.t.*)
.text 0x000000000000800c 0xa8 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtbegin.o
*(.gnu.warning)
*(.glue_7t)
.glue_7t 0x00000000000080b4 0x0 linker stubs
*(.glue_7)
.glue_7 0x00000000000080b4 0x0 linker stubs
*(.vfp11_veneer)
.vfp11_veneer 0x00000000000080b4 0x0 linker stubs
*(.v4_bx)
.v4_bx 0x00000000000080b4 0x0 linker stubs
.fini 0x00000000000080b4 0xc
*(SORT_NONE(.fini))
.fini 0x00000000000080b4 0x4 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crti.o
0x00000000000080b4 _fini
.fini 0x00000000000080b8 0x8 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtn.o
[!provide] PROVIDE (__etext = .)
[!provide] PROVIDE (_etext = .)
[!provide] PROVIDE (etext = .)
.rodata
*(.rodata .rodata.* .gnu.linkonce.r.*)
.rodata1
*(.rodata1)
.ARM.extab
*(.ARM.extab* .gnu.linkonce.armextab.*)
.ARM.exidx 0x00000000000080c0 0x0
[!provide] PROVIDE (__exidx_start = .)
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
[!provide] PROVIDE (__exidx_end = .)
.eh_frame_hdr
*(.eh_frame_hdr)
*(.eh_frame_entry .eh_frame_entry.*)
.eh_frame 0x00000000000080c0 0x4
*(.eh_frame)
.eh_frame 0x00000000000080c0 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtbegin.o
.eh_frame 0x00000000000080c0 0x4 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtend.o
*(.eh_frame.*)
.gcc_except_table
*(.gcc_except_table .gcc_except_table.*)
.gnu_extab
*(.gnu_extab*)
.exception_ranges
*(.exception_ranges*)
0x00000000000180c4 . = (ALIGN (CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 0x1)))
.eh_frame
*(.eh_frame)
*(.eh_frame.*)
.gnu_extab
*(.gnu_extab)
.gcc_except_table
*(.gcc_except_table .gcc_except_table.*)
.exception_ranges
*(.exception_ranges*)
.tdata 0x00000000000180c4 0x0
[!provide] PROVIDE (__tdata_start = .)
*(.tdata .tdata.* .gnu.linkonce.td.*)
.tbss
*(.tbss .tbss.* .gnu.linkonce.tb.*)
*(.tcommon)
.preinit_array 0x00000000000180c4 0x0
[!provide] PROVIDE (__preinit_array_start = .)
*(.preinit_array)
[!provide] PROVIDE (__preinit_array_end = .)
.init_array 0x00000000000180c4 0x4
[!provide] PROVIDE (__init_array_start = .)
*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))
*(.init_array EXCLUDE_FILE(*crtend?.o *crtend.o *crtbegin?.o *crtbegin.o) .ctors)
.init_array 0x00000000000180c4 0x4 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtbegin.o
[!provide] PROVIDE (__init_array_end = .)
.fini_array 0x00000000000180c8 0x4
[!provide] PROVIDE (__fini_array_start = .)
*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))
*(.fini_array EXCLUDE_FILE(*crtend?.o *crtend.o *crtbegin?.o *crtbegin.o) .dtors)
.fini_array 0x00000000000180c8 0x4 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtbegin.o
[!provide] PROVIDE (__fini_array_end = .)
.ctors
*crtbegin.o(.ctors)
*crtbegin?.o(.ctors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
*(SORT_BY_NAME(.ctors.*))
*(.ctors)
.dtors
*crtbegin.o(.dtors)
*crtbegin?.o(.dtors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
*(SORT_BY_NAME(.dtors.*))
*(.dtors)
.jcr
*(.jcr)
.data.rel.ro
*(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*)
*(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*)
.dynamic
*(.dynamic)
.got 0x00000000000180cc 0x0
*(.got.plt)
*(.igot.plt)
.igot.plt 0x00000000000180cc 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtbegin.o
*(.got)
*(.igot)
.data 0x00000000000180cc 0x0
0x00000000000180cc __data_start = .
*(.data .data.* .gnu.linkonce.d.*)
.tm_clone_table
0x00000000000180cc 0x0
.tm_clone_table
0x00000000000180cc 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtbegin.o
.tm_clone_table
0x00000000000180cc 0x0 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtend.o
.data1
*(.data1)
0x00000000000180cc _edata = .
[!provide] PROVIDE (edata = .)
0x00000000000180cc . = .
0x00000000000180cc __bss_start = .
0x00000000000180cc __bss_start__ = .
.bss 0x00000000000180cc 0x1c
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
.bss 0x00000000000180cc 0x1c /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtbegin.o
*(COMMON)
0x00000000000180e8 . = ALIGN ((. != 0x0)?0x4:0x1)
0x00000000000180e8 _bss_end__ = .
0x00000000000180e8 __bss_end__ = .
0x00000000000180e8 . = ALIGN (0x4)
0x00000000000180e8 . = SEGMENT_START ("ldata-segment", .)
0x00000000000180e8 . = ALIGN (0x4)
0x00000000000180e8 __end__ = .
0x00000000000180e8 _end = .
[!provide] PROVIDE (end = .)
.stack 0x0000000000080000 0x0
0x0000000000080000 _stack = .
*(.stack)
.stab
*(.stab)
.stabstr
*(.stabstr)
.stab.excl
*(.stab.excl)
.stab.exclstr
*(.stab.exclstr)
.stab.index
*(.stab.index)
.stab.indexstr
*(.stab.indexstr)
.comment 0x0000000000000000 0x47
*(.comment)
.comment 0x0000000000000000 0x47 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtbegin.o
0x48 (size before relaxing)
.comment 0x0000000000000047 0x48 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtend.o
.gnu.build.attributes
*(.gnu.build.attributes .gnu.build.attributes.*)
.debug
*(.debug)
.line
*(.line)
.debug_srcinfo
*(.debug_srcinfo)
.debug_sfnames
*(.debug_sfnames)
.debug_aranges
*(.debug_aranges)
.debug_pubnames
*(.debug_pubnames)
.debug_info
*(.debug_info .gnu.linkonce.wi.*)
.debug_abbrev
*(.debug_abbrev)
.debug_line
*(.debug_line .debug_line.* .debug_line_end)
.debug_frame
*(.debug_frame)
.debug_str
*(.debug_str)
.debug_loc
*(.debug_loc)
.debug_macinfo
*(.debug_macinfo)
.debug_weaknames
*(.debug_weaknames)
.debug_funcnames
*(.debug_funcnames)
.debug_typenames
*(.debug_typenames)
.debug_varnames
*(.debug_varnames)
.debug_pubtypes
*(.debug_pubtypes)
.debug_ranges
*(.debug_ranges)
.debug_macro
*(.debug_macro)
.debug_addr
*(.debug_addr)
.ARM.attributes
0x0000000000000000 0x33
*(.ARM.attributes)
.ARM.attributes
0x0000000000000000 0x23 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crti.o
.ARM.attributes
0x0000000000000023 0x35 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtbegin.o
.ARM.attributes
0x0000000000000058 0x35 /var/folders/kv/m3kq2vyj5zz4mmb1yn6t82gw0000gn/T//ccHGQQJk.o
.ARM.attributes
0x000000000000008d 0x35 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtend.o
.ARM.attributes
0x00000000000000c2 0x23 /Users/user/GRiSP/grisp2-rtems-toolchain/rtems/5/lib/gcc/arm-rtems5/7.5.0/thumb/armv7-a/neon/hard/crtn.o
*(.gnu.attributes)
.note.gnu.arm.ident
*(.note.gnu.arm.ident)
.noinit 0x00000000000180e8 0x0
0x00000000000180e8 . = ALIGN (0x2)
[!provide] PROVIDE (__noinit_start = .)
*(.noinit)
0x00000000000180e8 . = ALIGN (0x2)
[!provide] PROVIDE (__noinit_end = .)
/DISCARD/
*(.note.GNU-stack)
*(.gnu_debuglink)
*(.gnu.lto_*)
OUTPUT(conftest elf32-littlearm)
LOAD linker stubs
The problem is that this test is linked using -qnolinkcmds. This leads to:
ld: warning: cannot find entry symbol _start; defaulting to 000000000000800c
The start.o provided by the BSP would start the dependency chain which would pull in the main() function of the test. In the current setup, the tests are ineffective and always pass regardless what is tested.
You have to use the linker command file provided by the BSP.
That fixed it, thanks! I think the qnolinkcmds
was a leftover from the previous cross compilation flags we used.
As a matter of fact we needed to pick another than the default linkcmd for the GRiSP1 tool chain: -qnolinkcmds -T linkcmds.sdram
somehow the -qnolinkcmds
was left when adapting to GRiSP2
@peerst Unfortunately using those flags results in the original error again.
Sorry, that was a misunderstanding, just explained where -qnolinkcmds came from. Grisp1 had multiple linkcmds and we couldn't use the default one for whatever reason. This is not true for Grisp2
In GRiSP1 we had a board specific external SDRAM. That made it necessary to use a special linker command file. That's no longer true for GRiSP2.
Seems
mallopt
is missing somehow. I get this error when compiling the Erlang VM:That file includes
malloc.h
. In our main file we include the following header files:Is
mallopt
available in our RTEMS toolchain?