| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # Wrapper script named "ld" that either executes gold or the system linker. | 6 # Wrapper script named "ld" that either executes gold or the system linker. |
| 7 | 7 |
| 8 # The gold binary was built on 64-bit Ubuntu Lucid. Don't run it on | 8 # The gold binary was built on 64-bit Ubuntu Lucid. Don't run it on |
| 9 # non-64-bit machines. Note that "uname -m" prints the kernel architecture, | 9 # non-64-bit machines. Note that "uname -m" prints the kernel architecture, |
| 10 # while this binary will also fail on 64-bit kernels with 32-bit userlands. | 10 # while this binary will also fail on 64-bit kernels with 32-bit userlands. |
| 11 | 11 |
| 12 base_dir=$(dirname "$0") | 12 base_dir=$(dirname "$0") |
| 13 machine=$(gcc -dumpmachine) | 13 machine=$(gcc -dumpmachine) |
| 14 if [ "$machine" = "x86_64-linux-gnu" ]; then | 14 if [ "$machine" = "x86_64-linux-gnu" ]; then |
| 15 exec $base_dir/gold64 "$@" | 15 exec $base_dir/gold64 "$@" |
| 16 else | 16 else |
| 17 exec $base_dir/ld.bfd "$@" | 17 # Fall back on the ld found in $PATH. |
| 18 exec ld "$@" |
| 18 fi | 19 fi |
| OLD | NEW |