xref: /aosp_15_r20/external/elfutils/tests/run-unstrip-M.sh (revision 7304104da70ce23c86437a01be71edd1a2d7f37e)
1*7304104dSAndroid Build Coastguard Worker#! /bin/sh
2*7304104dSAndroid Build Coastguard Worker# Copyright (C) 2013 Red Hat, Inc.
3*7304104dSAndroid Build Coastguard Worker# This file is part of elfutils.
4*7304104dSAndroid Build Coastguard Worker#
5*7304104dSAndroid Build Coastguard Worker# This file is free software; you can redistribute it and/or modify
6*7304104dSAndroid Build Coastguard Worker# it under the terms of the GNU General Public License as published by
7*7304104dSAndroid Build Coastguard Worker# the Free Software Foundation; either version 3 of the License, or
8*7304104dSAndroid Build Coastguard Worker# (at your option) any later version.
9*7304104dSAndroid Build Coastguard Worker#
10*7304104dSAndroid Build Coastguard Worker# elfutils is distributed in the hope that it will be useful, but
11*7304104dSAndroid Build Coastguard Worker# WITHOUT ANY WARRANTY; without even the implied warranty of
12*7304104dSAndroid Build Coastguard Worker# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13*7304104dSAndroid Build Coastguard Worker# GNU General Public License for more details.
14*7304104dSAndroid Build Coastguard Worker#
15*7304104dSAndroid Build Coastguard Worker# You should have received a copy of the GNU General Public License
16*7304104dSAndroid Build Coastguard Worker# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17*7304104dSAndroid Build Coastguard Worker
18*7304104dSAndroid Build Coastguard Worker. $srcdir/test-subr.sh
19*7304104dSAndroid Build Coastguard Worker
20*7304104dSAndroid Build Coastguard Worker# Linux /proc/PID/maps file with some non-file entries (and fake exe/lib names).
21*7304104dSAndroid Build Coastguard Workertempfiles testmaps
22*7304104dSAndroid Build Coastguard Workercat > testmaps <<EOF
23*7304104dSAndroid Build Coastguard Worker00400000-024aa000 r-xp 00000000 08:02 159659                             /opt/TestBins/bin/arwijn
24*7304104dSAndroid Build Coastguard Worker026aa000-026b2000 rwxp 020aa000 08:02 159659                             /opt/TestBins/bin/arwijn
25*7304104dSAndroid Build Coastguard Worker026b2000-026bf000 rwxp 00000000 00:00 0
26*7304104dSAndroid Build Coastguard Worker0335a000-03e6f000 rwxp 00000000 00:00 0                                  [heap]
27*7304104dSAndroid Build Coastguard Worker2b7b38282000-2b7b38302000 rwxs 00000000 00:06 493872                     socket:[493872]
28*7304104dSAndroid Build Coastguard Worker2b7b38302000-2b7b38312000 rwxs 00000000 00:06 493872                     socket:[493872]
29*7304104dSAndroid Build Coastguard Worker2b7b38312000-2b7b38b12000 r-xs 00000000 00:06 493872                     socket:[493872]
30*7304104dSAndroid Build Coastguard Worker2b7b38b12000-2b7b38b22000 rwxs 00000000 00:06 493872                     socket:[493872]
31*7304104dSAndroid Build Coastguard Worker2b7b38b22000-2b7b39322000 rwxs 00000000 00:06 493872                     socket:[493872]
32*7304104dSAndroid Build Coastguard Worker2b7b4439f000-2b7b45ea1000 rwxp 00000000 00:00 0
33*7304104dSAndroid Build Coastguard Worker7f31e7d9f000-7f31e7f29000 r-xp 00000000 fd:00 917531                     /lib64/libc-1.13.so
34*7304104dSAndroid Build Coastguard Worker7f31e7f29000-7f31e8128000 ---p 0018a000 fd:00 917531                     /lib64/libc-1.13.so
35*7304104dSAndroid Build Coastguard Worker7f31e8128000-7f31e812c000 r--p 00189000 fd:00 917531                     /lib64/libc-1.13.so
36*7304104dSAndroid Build Coastguard Worker7f31e812c000-7f31e812d000 rw-p 0018d000 fd:00 917531                     /lib64/libc-1.13.so
37*7304104dSAndroid Build Coastguard Worker7f31e812d000-7f31e8132000 rw-p 00000000 00:00 0 
38*7304104dSAndroid Build Coastguard Worker7f31ea3f9000-7f31ea3fc000 rw-s 00000000 00:09 3744                       anon_inode:kvm-vcpu
39*7304104dSAndroid Build Coastguard Worker7f31ea3fc000-7f31ea3ff000 rw-s 00000000 00:09 3744                       anon_inode:kvm-vcpu
40*7304104dSAndroid Build Coastguard Worker7f31ea400000-7f31ea402000 rw-p 00000000 00:00 0 
41*7304104dSAndroid Build Coastguard Worker7fff26cf7000-7fff26d0c000 rwxp 00000000 00:00 0                          [stack]
42*7304104dSAndroid Build Coastguard Worker7fff26dff000-7fff26e00000 r-xp 00000000 00:00 0                          [vdso]
43*7304104dSAndroid Build Coastguard Workerffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
44*7304104dSAndroid Build Coastguard WorkerEOF
45*7304104dSAndroid Build Coastguard Worker
46*7304104dSAndroid Build Coastguard Workertestrun_compare ${abs_top_builddir}/src/unstrip -n -M testmaps <<\EOF
47*7304104dSAndroid Build Coastguard Worker0x400000+0x22b2000 - - - /opt/TestBins/bin/arwijn
48*7304104dSAndroid Build Coastguard Worker0x7f31e7d9f000+0x38e000 - - - /lib64/libc-1.13.so
49*7304104dSAndroid Build Coastguard WorkerEOF
50*7304104dSAndroid Build Coastguard Worker
51*7304104dSAndroid Build Coastguard Workerexit 0
52