From 174c4e814321c8b927abfb617f4772015ba9de21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Tue, 28 May 2019 16:35:17 +0200 Subject: [PATCH] master script: fix generate to same file --- synthesize_dwarf.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/synthesize_dwarf.sh b/synthesize_dwarf.sh index 6046f87..c983988 100755 --- a/synthesize_dwarf.sh +++ b/synthesize_dwarf.sh @@ -50,6 +50,7 @@ function dwarf_write_synth { function dwarf_plug { objcopy \ + --remove-section '.eh_frame' --remove-section '.eh_frame_hdr' \ --add-section .eh_frame="$TMP_DIR/eh_frame" \ "$INPUT_FILE" "$OUTPUT_FILE" return $? @@ -73,6 +74,10 @@ if ! [ -f "$INPUT_FILE" ] ; then >&2 echo -e "$INPUT_FILE: no such file.\n\n$HELP_TEXT" fi +if [ -z "$OUTPUT_FILE" ] ; then + OUTPUT_FILE="$INPUT_FILE" +fi + TMP_DIR="$(mktemp -d)" bap_synth \