forked from lattera/glibc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do check-textrel test using readelf rather than a build-time C program.
- Loading branch information
Showing
5 changed files
with
70 additions
and
209 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
2012-05-01 Roland McGrath <[email protected]> | ||
|
||
* scripts/check-textrel.awk: New file. | ||
* elf/Makefile ($(objpfx)check-textrel): Target removed. | ||
(check-textrel-CFLAGS): Variable removed. | ||
(all-built-dso): Use := to define.o | ||
($(all-built-dso:=.dyn)): New static pattern rule. | ||
(generated): Add those targets. | ||
($(objpfx)check-textrel.out): Use the script on the .dyn files. | ||
* config.make.in (READELF): New substituted variable. | ||
* elf/check-textrel.c: File removed. | ||
|
||
2012-05-01 Joseph Myers <[email protected]> | ||
|
||
* conform/data/assert.h-data [ISO || ISO99 || ISO11] (*_t): Do not | ||
|
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 was deleted.
Oops, something went wrong.
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,41 @@ | ||
# This awk script expects to get command-line files that are each | ||
# the output of 'readelf -d' on a single shared object. | ||
# It exits successfully (0) if none contained any TEXTREL markers. | ||
# It fails (1) if any did contain a TEXTREL marker. | ||
# It fails (2) if the input did not take the expected form. | ||
|
||
BEGIN { result = textrel = sanity = 0 } | ||
|
||
function check_one(name) { | ||
if (!sanity) { | ||
print name ": *** input did not look like readelf -d output"; | ||
result = 2; | ||
} else if (textrel) { | ||
print name ": *** text relocations used"; | ||
result = result ? result : 1; | ||
} else { | ||
print name ": OK"; | ||
} | ||
|
||
textrel = sanity = 0; | ||
} | ||
|
||
FILENAME != lastfile { | ||
if (lastfile) | ||
check_one(lastfile); | ||
lastfile = FILENAME; | ||
} | ||
|
||
$1 == "Tag" && $2 == "Type" { sanity = 1 } | ||
$2 == "(TEXTREL)" { textrel = 1 } | ||
$2 == "(FLAGS)" { | ||
for (i = 3; i <= NF; ++i) { | ||
if ($i == "TEXTREL") | ||
textrel = 1; | ||
} | ||
} | ||
|
||
END { | ||
check_one(lastfile); | ||
exit(result); | ||
} |