arm and avr toolchains tested a bit
parent
93f80f9c16
commit
f8fe82d230
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,160 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Add a .gdb_index section to a file.
|
||||
|
||||
# Copyright (C) 2010-2020 Free Software Foundation, Inc.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# This program assumes gdb and objcopy are in $PATH.
|
||||
# If not, or you want others, pass the following in the environment
|
||||
GDB=${GDB:=gdb}
|
||||
OBJCOPY=${OBJCOPY:=objcopy}
|
||||
READELF=${READELF:=readelf}
|
||||
|
||||
myname="${0##*/}"
|
||||
|
||||
dwarf5=""
|
||||
if [ "$1" = "-dwarf-5" ]; then
|
||||
dwarf5="$1"
|
||||
shift
|
||||
fi
|
||||
|
||||
if test $# != 1; then
|
||||
echo "usage: $myname [-dwarf-5] FILE" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
file="$1"
|
||||
|
||||
if test ! -r "$file"; then
|
||||
echo "$myname: unable to access: $file" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dir="${file%/*}"
|
||||
test "$dir" = "$file" && dir="."
|
||||
|
||||
dwz_file=""
|
||||
if $READELF -S "$file" | grep -q " \.gnu_debugaltlink "; then
|
||||
dwz_file=$($READELF --string-dump=.gnu_debugaltlink "$file" \
|
||||
| grep -A1 "'\.gnu_debugaltlink':" \
|
||||
| tail -n +2 \
|
||||
| sed 's/.*]//')
|
||||
dwz_file=$(echo $dwz_file)
|
||||
if $READELF -S "$dwz_file" | grep -E -q " \.(gdb_index|debug_names) "; then
|
||||
# Already has an index, skip it.
|
||||
dwz_file=""
|
||||
fi
|
||||
fi
|
||||
|
||||
set_files ()
|
||||
{
|
||||
local file="$1"
|
||||
|
||||
index4="${file}.gdb-index"
|
||||
index5="${file}.debug_names"
|
||||
debugstr="${file}.debug_str"
|
||||
debugstrmerge="${file}.debug_str.merge"
|
||||
debugstrerr="${file}.debug_str.err"
|
||||
}
|
||||
|
||||
tmp_files=
|
||||
for f in "$file" "$dwz_file"; do
|
||||
if [ "$f" = "" ]; then
|
||||
continue
|
||||
fi
|
||||
set_files "$f"
|
||||
tmp_files="$tmp_files $index4 $index5 $debugstr $debugstrmerge $debugstrerr"
|
||||
done
|
||||
|
||||
rm -f $tmp_files
|
||||
|
||||
# Ensure intermediate index file is removed when we exit.
|
||||
trap "rm -f $tmp_files" 0
|
||||
|
||||
$GDB --batch -nx -iex 'set auto-load no' \
|
||||
-ex "file $file" -ex "save gdb-index $dwarf5 $dir" || {
|
||||
# Just in case.
|
||||
status=$?
|
||||
echo "$myname: gdb error generating index for $file" 1>&2
|
||||
exit $status
|
||||
}
|
||||
|
||||
# In some situations gdb can exit without creating an index. This is
|
||||
# not an error.
|
||||
# E.g., if $file is stripped. This behaviour is akin to stripping an
|
||||
# already stripped binary, it's a no-op.
|
||||
status=0
|
||||
|
||||
handle_file ()
|
||||
{
|
||||
local file
|
||||
file="$1"
|
||||
|
||||
set_files "$file"
|
||||
|
||||
if test -f "$index4" -a -f "$index5"; then
|
||||
echo "$myname: Both index types were created for $file" 1>&2
|
||||
status=1
|
||||
elif test -f "$index4" -o -f "$index5"; then
|
||||
if test -f "$index4"; then
|
||||
index="$index4"
|
||||
section=".gdb_index"
|
||||
else
|
||||
index="$index5"
|
||||
section=".debug_names"
|
||||
fi
|
||||
debugstradd=false
|
||||
debugstrupdate=false
|
||||
if test -s "$debugstr"; then
|
||||
if ! $OBJCOPY --dump-section .debug_str="$debugstrmerge" "$file" \
|
||||
/dev/null 2>$debugstrerr; then
|
||||
cat >&2 $debugstrerr
|
||||
exit 1
|
||||
fi
|
||||
if grep -q "can't dump section '.debug_str' - it does not exist" \
|
||||
$debugstrerr; then
|
||||
debugstradd=true
|
||||
else
|
||||
debugstrupdate=true
|
||||
cat >&2 $debugstrerr
|
||||
fi
|
||||
cat "$debugstr" >>"$debugstrmerge"
|
||||
fi
|
||||
|
||||
$OBJCOPY --add-section $section="$index" \
|
||||
--set-section-flags $section=readonly \
|
||||
$(if $debugstradd; then \
|
||||
echo --add-section .debug_str="$debugstrmerge"; \
|
||||
echo --set-section-flags .debug_str=readonly; \
|
||||
fi; \
|
||||
if $debugstrupdate; then \
|
||||
echo --update-section .debug_str="$debugstrmerge"; \
|
||||
fi) \
|
||||
"$file" "$file"
|
||||
|
||||
status=$?
|
||||
else
|
||||
echo "$myname: No index was created for $file" 1>&2
|
||||
echo "$myname: [Was there no debuginfo? Was there already an index?]" \
|
||||
1>&2
|
||||
fi
|
||||
}
|
||||
|
||||
handle_file "$file"
|
||||
if [ "$dwz_file" != "" ]; then
|
||||
handle_file "$dwz_file"
|
||||
fi
|
||||
|
||||
exit $status
|
@ -0,0 +1,116 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Add a .gdb_index section to a file.
|
||||
|
||||
# Copyright (C) 2010-2019 Free Software Foundation, Inc.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# This program assumes gdb and objcopy are in $PATH.
|
||||
# If not, or you want others, pass the following in the environment
|
||||
GDB=${GDB:=gdb}
|
||||
OBJCOPY=${OBJCOPY:=objcopy}
|
||||
|
||||
myname="${0##*/}"
|
||||
|
||||
dwarf5=""
|
||||
if [ "$1" = "-dwarf-5" ]; then
|
||||
dwarf5="$1"
|
||||
shift
|
||||
fi
|
||||
|
||||
if test $# != 1; then
|
||||
echo "usage: $myname [-dwarf-5] FILE" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
file="$1"
|
||||
|
||||
if test ! -r "$file"; then
|
||||
echo "$myname: unable to access: $file" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dir="${file%/*}"
|
||||
test "$dir" = "$file" && dir="."
|
||||
index4="${file}.gdb-index"
|
||||
index5="${file}.debug_names"
|
||||
debugstr="${file}.debug_str"
|
||||
debugstrmerge="${file}.debug_str.merge"
|
||||
debugstrerr="${file}.debug_str.err"
|
||||
|
||||
rm -f $index4 $index5 $debugstr $debugstrmerge $debugstrerr
|
||||
# Ensure intermediate index file is removed when we exit.
|
||||
trap "rm -f $index4 $index5 $debugstr $debugstrmerge $debugstrerr" 0
|
||||
|
||||
$GDB --batch -nx -iex 'set auto-load no' \
|
||||
-ex "file $file" -ex "save gdb-index $dwarf5 $dir" || {
|
||||
# Just in case.
|
||||
status=$?
|
||||
echo "$myname: gdb error generating index for $file" 1>&2
|
||||
exit $status
|
||||
}
|
||||
|
||||
# In some situations gdb can exit without creating an index. This is
|
||||
# not an error.
|
||||
# E.g., if $file is stripped. This behaviour is akin to stripping an
|
||||
# already stripped binary, it's a no-op.
|
||||
status=0
|
||||
|
||||
if test -f "$index4" -a -f "$index5"; then
|
||||
echo "$myname: Both index types were created for $file" 1>&2
|
||||
status=1
|
||||
elif test -f "$index4" -o -f "$index5"; then
|
||||
if test -f "$index4"; then
|
||||
index="$index4"
|
||||
section=".gdb_index"
|
||||
else
|
||||
index="$index5"
|
||||
section=".debug_names"
|
||||
fi
|
||||
debugstradd=false
|
||||
debugstrupdate=false
|
||||
if test -s "$debugstr"; then
|
||||
if ! $OBJCOPY --dump-section .debug_str="$debugstrmerge" "$file" /dev/null \
|
||||
2>$debugstrerr; then
|
||||
cat >&2 $debugstrerr
|
||||
exit 1
|
||||
fi
|
||||
if grep -q "can't dump section '.debug_str' - it does not exist" \
|
||||
$debugstrerr; then
|
||||
debugstradd=true
|
||||
else
|
||||
debugstrupdate=true
|
||||
cat >&2 $debugstrerr
|
||||
fi
|
||||
cat "$debugstr" >>"$debugstrmerge"
|
||||
fi
|
||||
|
||||
$OBJCOPY --add-section $section="$index" \
|
||||
--set-section-flags $section=readonly \
|
||||
$(if $debugstradd; then \
|
||||
echo --add-section .debug_str="$debugstrmerge"; \
|
||||
echo --set-section-flags .debug_str=readonly; \
|
||||
fi; \
|
||||
if $debugstrupdate; then \
|
||||
echo --update-section .debug_str="$debugstrmerge"; \
|
||||
fi) \
|
||||
"$file" "$file"
|
||||
|
||||
status=$?
|
||||
else
|
||||
echo "$myname: No index was created for $file" 1>&2
|
||||
echo "$myname: [Was there no debuginfo? Was there already an index?]" 1>&2
|
||||
fi
|
||||
|
||||
exit $status
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,37 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Copyright (c) 2004, Joerg Wunsch
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# * Neither the name of the copyright holders nor the names of
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
## man(1) replacement to access the avr-libc manual pages
|
||||
|
||||
: ${DESTDIR:-}
|
||||
prefix=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-linux_x86_64
|
||||
datadir=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-linux_x86_64
|
||||
|
||||
exec man -M /home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-linux_x86_64/doc/avr-libc/man "$@"
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
Subproject commit e21a33c232038574c67cb2a9222c4d5fbe33f7d3
|
Loading…
Reference in New Issue