|
Packit Service |
97d2fb |
#! /bin/sh
|
|
Packit Service |
97d2fb |
# Copyright (C) 2018 Red Hat, Inc.
|
|
Packit Service |
97d2fb |
# This file is part of elfutils.
|
|
Packit Service |
97d2fb |
#
|
|
Packit Service |
97d2fb |
# This file is free software; you can redistribute it and/or modify
|
|
Packit Service |
97d2fb |
# it under the terms of the GNU General Public License as published by
|
|
Packit Service |
97d2fb |
# the Free Software Foundation; either version 3 of the License, or
|
|
Packit Service |
97d2fb |
# (at your option) any later version.
|
|
Packit Service |
97d2fb |
#
|
|
Packit Service |
97d2fb |
# elfutils is distributed in the hope that it will be useful, but
|
|
Packit Service |
97d2fb |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
97d2fb |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
97d2fb |
# GNU General Public License for more details.
|
|
Packit Service |
97d2fb |
#
|
|
Packit Service |
97d2fb |
# You should have received a copy of the GNU General Public License
|
|
Packit Service |
97d2fb |
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
. $srcdir/test-subr.sh
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
# Generated on s390x with an older gas (2.29.1) that generates
|
|
Packit Service |
97d2fb |
# badly aligned version notes.
|
|
Packit Service |
97d2fb |
#
|
|
Packit Service |
97d2fb |
# = testfile-version.s =
|
|
Packit Service |
97d2fb |
#
|
|
Packit Service |
97d2fb |
# .section ".extra"
|
|
Packit Service |
97d2fb |
# .byte 42
|
|
Packit Service |
97d2fb |
#
|
|
Packit Service |
97d2fb |
# .version "Sliding Snow"
|
|
Packit Service |
97d2fb |
# .version "Hurr durr 3.1"
|
|
Packit Service |
97d2fb |
#
|
|
Packit Service |
97d2fb |
# .globl _start
|
|
Packit Service |
97d2fb |
#_start:
|
|
Packit Service |
97d2fb |
#
|
|
Packit Service |
97d2fb |
# gcc -nostartfiles -nodefaultlibs -o testfile-version testfile-version.s
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
testfiles testfile-version
|
|
Packit Service |
97d2fb |
tempfiles debug.out elf.out
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
testrun ${abs_top_builddir}/src/strip -o elf.out -f debug.out \
|
|
Packit Service |
97d2fb |
testfile-version
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
testrun ${abs_top_builddir}/src/elflint --gnu elf.out
|
|
Packit Service |
97d2fb |
testrun ${abs_top_builddir}/src/elflint --gnu --debug debug.out
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
testrun_compare ${abs_top_builddir}/src/readelf -n debug.out <<\EOF
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
Note section [ 1] '.note.gnu.build-id' of 36 bytes at offset 0xb0:
|
|
Packit Service |
97d2fb |
Owner Data size Type
|
|
Packit Service |
97d2fb |
GNU 20 GNU_BUILD_ID
|
|
Packit Service |
97d2fb |
Build ID: d3c84c0b307c06f50a37c6c0f59c82c4cb10720b
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
Note section [ 3] '.note' of 56 bytes at offset 0xd5:
|
|
Packit Service |
97d2fb |
Owner Data size Type
|
|
Packit Service |
97d2fb |
Sliding Snow 0 VERSION
|
|
Packit Service |
97d2fb |
Hurr durr 3.1 0 VERSION
|
|
Packit Service |
97d2fb |
EOF
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
exit 0
|