Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | #!/bin/sh |
michael@0 | 2 | |
michael@0 | 3 | # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
michael@0 | 4 | # Use of this source code is governed by a BSD-style license that can be |
michael@0 | 5 | # found in the LICENSE file. |
michael@0 | 6 | # |
michael@0 | 7 | # Helper script to run dump_syms on Chrome Linux executables and strip |
michael@0 | 8 | # them if needed. |
michael@0 | 9 | |
michael@0 | 10 | set -e |
michael@0 | 11 | |
michael@0 | 12 | usage() { |
michael@0 | 13 | echo -n "$0 <dump_syms_exe> <strip_binary> " >&2 |
michael@0 | 14 | echo "<binary_with_symbols> <symbols_output>" >&2 |
michael@0 | 15 | } |
michael@0 | 16 | |
michael@0 | 17 | |
michael@0 | 18 | if [ $# -ne 4 ]; then |
michael@0 | 19 | usage |
michael@0 | 20 | exit 1 |
michael@0 | 21 | fi |
michael@0 | 22 | |
michael@0 | 23 | SCRIPTDIR="$(readlink -f "$(dirname "$0")")" |
michael@0 | 24 | DUMPSYMS="$1" |
michael@0 | 25 | STRIP_BINARY="$2" |
michael@0 | 26 | INFILE="$3" |
michael@0 | 27 | OUTFILE="$4" |
michael@0 | 28 | |
michael@0 | 29 | # Dump the symbols from the given binary. |
michael@0 | 30 | if [ ! -e "$OUTFILE" -o "$INFILE" -nt "$OUTFILE" ]; then |
michael@0 | 31 | "$DUMPSYMS" "$INFILE" > "$OUTFILE" |
michael@0 | 32 | fi |
michael@0 | 33 | |
michael@0 | 34 | if [ "$STRIP_BINARY" != "0" ]; then |
michael@0 | 35 | strip "$INFILE" |
michael@0 | 36 | fi |