Skip to content

Commit b717f4f

Browse files
committed
bug fix pic:elf do not generate unwind table
modlib_read: Read 64 bytes from offset 192665 modlib_symvalue: ERROR: SHN_UNDEF: Exported symbol "__gnu_Unwind_Find_exidx" not found modlib_relocate: ERROR: Section 2 reloc 12: Failed to get value of symbol[246]: -2 elf_loadbinary: Failed to bind symbols program binary: -2 builtin_loadbinary: Loading file: /pic/hello Signed-off-by: anjiahao <anjiahao@xiaomi.com>
1 parent 2b092ad commit b717f4f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/arm/src/common/Toolchain.defs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,8 @@ CXXELFFLAGS = $(CXXFLAGS)-fvisibility=hidden -mlong-calls
554554

555555
ifeq ($(CONFIG_PIC),y)
556556
CFLAGS += --fixed-r10
557-
CELFFLAGS += $(PICFLAGS) -mpic-register=r10
558-
CXXELFFLAGS += $(PICFLAGS) -mpic-register=r10
557+
CELFFLAGS += $(PICFLAGS) -mpic-register=r10 -fno-unwind-tables -fno-asynchronous-unwind-tables
558+
CXXELFFLAGS += $(PICFLAGS) -mpic-register=r10 -fno-unwind-tables -fno-asynchronous-unwind-tables
559559

560560
# Generate an executable elf, need to ignore undefined symbols
561561
LDELFFLAGS += --unresolved-symbols=ignore-in-object-files --emit-relocs

0 commit comments

Comments
 (0)