fix build issues when building stm32f4discovery with elf and cpp exceptions#11688
Open
CookieDoughMixer wants to merge 2 commits intoapache:masterfrom
Open
fix build issues when building stm32f4discovery with elf and cpp exceptions#11688CookieDoughMixer wants to merge 2 commits intoapache:masterfrom
CookieDoughMixer wants to merge 2 commits intoapache:masterfrom
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>
acassis
approved these changes
Feb 13, 2024
acassis
requested changes
Feb 13, 2024
…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
|
|
||
| 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) |
Contributor
There was a problem hiding this comment.
@abhishek-samsung let's fix gnu-elf.ld directly.
Author
There was a problem hiding this comment.
I was told not to direclty modify the gnu-elf.ld file, as it might be used for other architectures
Contributor
There was a problem hiding this comment.
The nonexistent section doesn't have any bad side effect. @acassis is it good to only fix stm32f4discovery?
Contributor
There was a problem hiding this comment.
@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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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