Commit bb787c29 authored by stolz's avatar stolz
Browse files

[project @ 2004-09-16 08:13:02 by stolz]

Collect unknown chunks in new chkcat 'unknown' which gets treated like
'misc', but isn't mangled on sparc-*-solaris2 because of function
definitions in C-headers like <pwd.h>. This shouldn't affect any
other platform since this was already a border-case.

Closes SF Bug 1012521 "getUserEntryForID dies".
Please merge.
parent 81c59c75
......@@ -615,8 +615,9 @@ sub mangle_asm {
local($thing);
chop($thing = $_);
$thing =~ s/:$//;
print STDERR "Warning: retaining unknown function \`$thing' in output from C compiler\n"
unless # $KNOWN_FUNNY_THING{$thing}
$chk[++$i] = $_;
$chksymb[$i] = '';
if (
/^${T_US}stg_.*${T_POST_LBL}$/o # RTS internals
|| /^${T_US}__stg_.*${T_POST_LBL}$/o # more RTS internals
|| /^${T_US}__fexp_.*${T_POST_LBL}$/o # foreign export
......@@ -626,10 +627,13 @@ sub mangle_asm {
|| /^${T_US}.*_srtd${T_POST_LBL}$/o # large bitmaps
|| /^${T_US}.*_fast${T_POST_LBL}$/o # primops
|| /^${T_US}.*_closure_tbl${T_POST_LBL}$/o # closure tables
|| /^_uname:/o; # x86/Solaris2
$chk[++$i] = $_;
$chkcat[$i] = 'misc';
$chksymb[$i] = '';
|| /^_uname:/o # x86/Solaris2
) {
$chkcat[$i] = 'misc';
} else {
print STDERR "Warning: retaining unknown function \`$thing' in output from C compiler\n";
$chkcat[$i] = 'unknown';
}
} elsif ( $TargetPlatform =~ /^powerpc-apple-.*/ && (
/^\.picsymbol_stub/
......@@ -866,9 +870,12 @@ sub mangle_asm {
# On SPARCs, we don't do --- BEGIN/END ---, we just
# toss the register-windowing save/restore/ret* instructions
# directly:
# directly unless they've been generated by function definitions in header
# files on Solaris:
if ( $TargetPlatform =~ /^sparc-/ ) {
$c =~ s/^\t(save.*|restore.*|ret|retl)\n//g;
if ( ! ( $TargetPlatform =~ /solaris2$/ && $chkcat[$i] eq 'unknown' )) {
$c =~ s/^\t(save.*|restore.*|ret|retl)\n//g;
}
# throw away PROLOGUE comments
$c =~ s/^\t!#PROLOGUE# 0\n\t!#PROLOGUE# 1\n//;
}
......@@ -1031,7 +1038,7 @@ sub mangle_asm {
next if $chkcat[$i] eq 'DONE ALREADY';
if ( $chkcat[$i] eq 'misc' ) {
if ( $chkcat[$i] eq 'misc' || $chkcat[$i] eq 'unknown' ) {
if ($chk[$i] ne '') {
print OUTASM $T_HDR_misc;
&print_doctored($chk[$i], 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment