A workaround for macOS linker

It seems that "ld -r" on macOS doesn't include objects from
libraries for common symbols. Because of that, sim build
ends up with undefined references to globals like g_binfmts
and g_mmheap.

	@(#)PROGRAM:ld  PROJECT:ld64-530
	BUILD 18:57:17 Dec 13 2019
	configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
	LTO support using: LLVM version 11.0.0, (clang-1100.0.33.17) (static support for 23, runtime is 23)
	TAPI support using: Apple TAPI version 11.0.0 (tapi-1100.0.11)
This commit is contained in:
YAMAMOTO Takashi
2020-01-29 03:29:10 +09:00
committed by Alin Jerpelea
parent 298c2e5e4f
commit cc90d586c0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -56,7 +56,7 @@
* protection to simply disable pre-emption when accessing this list. * protection to simply disable pre-emption when accessing this list.
*/ */
FAR struct binfmt_s *g_binfmts; FAR struct binfmt_s *g_binfmts = NULL;
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
+1 -1
View File
@@ -64,5 +64,5 @@
#else #else
/* Otherwise, the user heap data structures are in common .bss */ /* Otherwise, the user heap data structures are in common .bss */
struct mm_heap_s g_mmheap; struct mm_heap_s g_mmheap = {};
#endif #endif