Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Side by Side Diff: chrome/tools/build/mac/verify_order

Issue 1773683002: Remove -f and swap -s flag from nm call in verify_order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also swap -s segname flag Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Verifies that no global text symbols are present in a Mach-O file 7 # Verifies that no global text symbols are present in a Mach-O file
8 # (MACH_O_FILE) at an address higher than the address of a specific symbol 8 # (MACH_O_FILE) at an address higher than the address of a specific symbol
9 # (LAST_SYMBOL). If LAST_SYMBOL is not found in MACH_O_FILE or if symbols 9 # (LAST_SYMBOL). If LAST_SYMBOL is not found in MACH_O_FILE or if symbols
10 # are present with addresses higher than LAST_SYMBOL's address, an error 10 # are present with addresses higher than LAST_SYMBOL's address, an error
11 # message is printed to stderr, and the script will exit nonzero. 11 # message is printed to stderr, and the script will exit nonzero.
12 # 12 #
13 # This script can be used to verify that all of the global text symbols in 13 # This script can be used to verify that all of the global text symbols in
14 # a Mach-O file are accounted for in an order file. 14 # a Mach-O file are accounted for in an order file.
15 # 15 #
16 # Also check that the file does not depend on either of libstdc++ or libc++. 16 # Also check that the file does not depend on either of libstdc++ or libc++.
17 17
18 if [ ${#} -ne 2 ] ; then 18 if [ ${#} -ne 2 ] ; then
19 echo "usage: ${0} LAST_SYMBOL MACH_O_FILE" >& 2 19 echo "usage: ${0} LAST_SYMBOL MACH_O_FILE" >& 2
20 exit 1 20 exit 1
21 fi 21 fi
22 22
23 LAST_SYMBOL=${1} 23 LAST_SYMBOL=${1}
24 MACH_O_FILE=${2} 24 MACH_O_FILE=${2}
25 25
26 SYMBOLS=$(nm -fgjn -s __TEXT __text "${MACH_O_FILE}") 26 SYMBOLS=$(nm -gjn "${MACH_O_FILE}" -s __TEXT __text)
27 if [ ${?} -ne 0 ] || [ -z "${SYMBOLS}" ] ; then 27 if [ ${?} -ne 0 ] || [ -z "${SYMBOLS}" ] ; then
28 echo "${0}: no symbols in ${MACH_O_FILE}" >& 2 28 echo "${0}: no symbols in ${MACH_O_FILE}" >& 2
29 exit 1 29 exit 1
30 fi 30 fi
31 31
32 LAST_SYMBOLS=$(grep -A 100 -Fx "${LAST_SYMBOL}" <<< "${SYMBOLS}") 32 LAST_SYMBOLS=$(grep -A 100 -Fx "${LAST_SYMBOL}" <<< "${SYMBOLS}")
33 if [ ${?} -ne 0 ] || [ -z "${LAST_SYMBOLS}" ] ; then 33 if [ ${?} -ne 0 ] || [ -z "${LAST_SYMBOLS}" ] ; then
34 echo "${0}: symbol ${LAST_SYMBOL} not found in ${MACH_O_FILE}" >& 2 34 echo "${0}: symbol ${LAST_SYMBOL} not found in ${MACH_O_FILE}" >& 2
35 exit 1 35 exit 1
36 fi 36 fi
(...skipping 13 matching lines...) Expand all
50 if grep -Fq libstdc++ <<< ${LIBS} ; then 50 if grep -Fq libstdc++ <<< ${LIBS} ; then
51 echo "${0}: ${MACH_O_FILE} depends on libstdc++" >& 2 51 echo "${0}: ${MACH_O_FILE} depends on libstdc++" >& 2
52 exit 1 52 exit 1
53 fi 53 fi
54 if grep -Fq libc++ <<< ${LIBS} ; then 54 if grep -Fq libc++ <<< ${LIBS} ; then
55 echo "${0}: ${MACH_O_FILE} depends on libc++" >& 2 55 echo "${0}: ${MACH_O_FILE} depends on libc++" >& 2
56 exit 1 56 exit 1
57 fi 57 fi
58 58
59 exit 0 59 exit 0
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698