Use -Wl,--start-group and -Wl,--end-group for linking the simulator.

This makes linking always work regardless of symbol order.

Change-Id: I620f55cbfaaff498d4ca095a99e1412f5fbad4e5
This commit is contained in:
Frank Gevaerts 2012-06-20 01:14:40 +02:00
parent 707e9d8945
commit 0adc32d079

View file

@ -31,7 +31,7 @@ $(SIMLIB): $$(SIMOBJ) $(UIBMP)
$(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
$(BUILDDIR)/$(BINARY): $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $(SIMLIB)
$(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(SIMLIB) $(LDOPTS) $(GLOBAL_LDOPTS) \
$(call PRINTS,LD $(BINARY))$(CC) -o $@ -Wl,--start-group $^ -Wl,--end-group $(LDOPTS) $(GLOBAL_LDOPTS) \
-Wl,-Map,$(BUILDDIR)/rockbox.map
$(SILENT)$(call objcopy,$@,$@)