Skip to content

Commit 703f68b

Browse files
Removing the .ARM.exidx section instead of patching
1 parent ad9942a commit 703f68b

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

tools/build_newlib.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ apt install -y --no-install-recommends texinfo
4646
# Get the latest fixed version
4747
git clone --depth=1 --single-branch --branch newlib-4.5.0 https://sourceware.org/git/newlib-cygwin.git "${SRC}"
4848

49-
# Apply patch to fix "undefined symbol: __aeabi_unwind_cpp_pr0 referenced by libc_a-setjmp.o" issue
50-
PATCH_NAME="cantunwind.patch"
51-
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
52-
cp "${SCRIPT_DIR}/${PATCH_NAME}" "${SRC}"
53-
cd "${SRC}"
54-
git apply "${PATCH_NAME}"
55-
cd ..
56-
5749
# Build configuration
5850
mkdir -p "${BUILD}" "${INSTALL}"
5951
cd "${BUILD}"
@@ -86,6 +78,9 @@ CFLAGS_FOR_TARGET="-ffunction-sections -fdata-sections -fshort-wchar -DPREFER_SI
8678
make "-j$(nproc)"
8779
make install
8880

81+
# Removing the .ARM.exidx section
82+
arm-none-eabi-objcopy -R .ARM.exidx "${INSTALL}/arm-none-eabi/lib/libc.a"
83+
8984
# Stripping debug symbols
9085
arm-none-eabi-strip --strip-debug "${INSTALL}/arm-none-eabi/lib/libc.a"
9186
arm-none-eabi-strip --strip-debug "${INSTALL}/arm-none-eabi/lib/libm.a"

0 commit comments

Comments
 (0)