-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix build issues when building stm32f4discovery with elf and cpp exceptions #11688
base: master
Are you sure you want to change the base?
Conversation
fix the following error by including stdbool.h in elf.h CC: machine/arm/gnu_unwind_find_exidx.c In file included from machine/arm/gnu_unwind_find_exidx.c:25: /home/abhishek/Work/public/nuttx_build/nuttx/include/nuttx/elf.h:118:1: error: unknown type name 'bool' 118 | bool up_checkarch(FAR const Elf_Ehdr *hdr); | ^~~~ make[1]: *** [Makefile:153: bin/gnu_unwind_find_exidx.o] Error 1 make: *** [tools/LibTargets.mk:180: libs/libc/libc.a] Error 2 Signed-off-by: Abhishek Akkabathula <a.akkabathul@samsung.com>
…ions exidx and extab sections are required for exception handling and are not part of linker script present in binfmt/libelf. Hence, added linker script with the sections for stm32f4discovery Signed-off-by: Abhishek Akkabathula <a.akkabathul@samsung.com>
39018d1
to
f2a31da
Compare
@@ -51,4 +51,4 @@ CELFFLAGS = $(CFLAGS) -mlong-calls # --target1-abs | |||
CXXELFFLAGS = $(CXXFLAGS) -mlong-calls # --target1-abs | |||
|
|||
LDELFFLAGS = -r -e main | |||
LDELFFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)/binfmt/libelf/gnu-elf.ld) | |||
LDELFFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)/boards/arm/stm32/stm32f4discovery/scripts/gnu-elf.ld) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abhishek-samsung let's fix gnu-elf.ld directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was told not to direclty modify the gnu-elf.ld file, as it might be used for other architectures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nonexistent section doesn't have any bad side effect. @acassis is it good to only fix stm32f4discovery?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xiaoxiang781216 adding an ARM only section inside a generic libelf doesn't seams the right approach. An option is creating a generic section and at board level that section is defined and include the ARM specific section inside it (other boards from different arch could do the same). Maybe @patacongo could have a better solution.
Summary
binfmt/libelf: add exidx and extab sections in linker script
include/nuttx: fix "unknown type name bool" build error in elf.h
Impact
Testing