-
-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #505
- Loading branch information
Showing
7 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
export LC_ALL=C | ||
set -e | ||
CC="${CC:-cc}" | ||
CXX="${CXX:-c++}" | ||
GCC="${GCC:-gcc}" | ||
GXX="${GXX:-g++}" | ||
OBJDUMP="${OBJDUMP:-objdump}" | ||
MACHINE="${MACHINE:-$(uname -m)}" | ||
testname=$(basename "$0" .sh) | ||
echo -n "Testing $testname ... " | ||
cd "$(dirname "$0")"/../.. | ||
t=out/test/elf/$testname | ||
mkdir -p $t | ||
|
||
cat <<EOF | $CC -o $t/a.o -c -xc - | ||
#include <stdio.h> | ||
int main() { | ||
printf("Hello world\n"); | ||
} | ||
EOF | ||
|
||
$CC -B. -o $t/exe $t/a.o -Wl,-package-metadata='{"foo":"bar"}' | ||
readelf -x .note.package $t/exe | fgrep -q '{"foo":"bar"}' | ||
This comment was marked as resolved.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
echo OK |
note that this won't work if binutils/readelf doesn't know how to pretty-print the FDO note. With older versions the output looks like: