mirror of git://gcc.gnu.org/git/gcc.git
Remove any .comment sections if the first cmp failed
PR bootstrap/53472 * contrib/compare-debug (remove_comment): New function. Remove any .comment sections if the first cmp failed. From-SVN: r187879
This commit is contained in:
parent
619a69500d
commit
c7046906c3
|
@ -1,3 +1,9 @@
|
||||||
|
2012-05-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
PR bootstrap/53472
|
||||||
|
* contrib/compare-debug (remove_comment): New function.
|
||||||
|
Remove any .comment sections if the first cmp failed.
|
||||||
|
|
||||||
2012-05-09 David Edelsohn <dje.gcc@gmail.com>
|
2012-05-09 David Edelsohn <dje.gcc@gmail.com>
|
||||||
|
|
||||||
* gcc_update: Use $GCC_SVN to retrieve branch and revision.
|
* gcc_update: Use $GCC_SVN to retrieve branch and revision.
|
||||||
|
|
|
@ -73,11 +73,35 @@ Darwin)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
remove_comment ()
|
||||||
|
{
|
||||||
|
file=$1
|
||||||
|
opts=
|
||||||
|
for s in `objdump --section-headers "$file" | awk '{ print $2 }'`; do
|
||||||
|
case "$s" in
|
||||||
|
.comment*)
|
||||||
|
opts="$opts --remove-section $s"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
[ -n "$opts" ] && objcopy $opts $file
|
||||||
|
}
|
||||||
|
|
||||||
if cmp "$1.$suf1" "$2.$suf2"; then
|
if cmp "$1.$suf1" "$2.$suf2"; then
|
||||||
status=0
|
status=0
|
||||||
else
|
else
|
||||||
status=1
|
status=1
|
||||||
|
|
||||||
|
# Remove any .comment sections.
|
||||||
|
if (objcopy -v) 2>&1 | grep ' --remove-section' > /dev/null \
|
||||||
|
&& (objdump --help) 2>&1 | grep ' --\[*section-\]*headers' > /dev/null; then
|
||||||
|
remove_comment "$1.$suf1"
|
||||||
|
remove_comment "$2.$suf2"
|
||||||
|
if cmp "$1.$suf1" "$2.$suf2"; then
|
||||||
|
status=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Assembler-generated CFI will add an .eh_frame section for -g not
|
# Assembler-generated CFI will add an .eh_frame section for -g not
|
||||||
# present in -g0. Try to cope with it by checking that an .eh_frame
|
# present in -g0. Try to cope with it by checking that an .eh_frame
|
||||||
# section is present in either object file, and then stripping it
|
# section is present in either object file, and then stripping it
|
||||||
|
|
Loading…
Reference in New Issue