Skip to content

Commit 3a08098

Browse files
committed
/home/fox/release/dtrace/2009/dtrace-20090217.tar.bz2
1 parent c2c088a commit 3a08098

6 files changed

Lines changed: 80 additions & 2 deletions

File tree

Changes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Tue Feb 17 22:07:40 2009 fox
2+
3+
144* dt_link.c: When writing the USDT output object file, use
4+
a section type of SHT_PROGBITS and not SHT_SUNW_dof, since
5+
some older binutils/ld will not like what we did (too
6+
over zealous validation).
7+
18
Mon Feb 16 22:59:10 2009 fox
29

310
143* Archive: 1.0061

driver/ctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ HERE();
374374
/* tree, then we wouldnt need this hack. */
375375
/**********************************************************************/
376376
# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)
377-
# define PROC_I(i) proc_task(i)
377+
# define PROC_I(i) proc_task_lookup(i) /* should this be proc_task() ? do we care ? */
378378
# define file_dentry(f) file->f_dentry
379379
# define inode_to_task(inode) proc_task(inode)
380380
# define inode_to_pid(inode) PROC_I(inode)->pid

libdtrace/dt_link.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,22 @@ dump_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, int fd)
511511
shp = &elf_file.shdr[ESHDR_DOF];
512512
shp->sh_name = 11; /* DTRACE_SHSTRTAB32[11] = ".SUNW_dof" */
513513
shp->sh_flags = SHF_ALLOC;
514+
/***********************************************/
515+
/* Warning: some older versions of /bin/ld */
516+
/* dont like us defining/using a high value */
517+
/* (>100?) for the type field. Seem to be */
518+
/* too severe in validating the input file. */
519+
/* (objdump/binutils dont like it either). */
520+
/* We will cheat here and use SHT_PROGBITS, */
521+
/* since the linker doesnt mind. A failing */
522+
/* linker, e.g. AS4, is */
523+
/* GNU ld version 2.15.92.0.2 20040927 */
524+
/***********************************************/
525+
# if 1
526+
shp->sh_type = SHT_PROGBITS;
527+
# else
514528
shp->sh_type = SHT_SUNW_dof;
529+
# endif
515530
shp->sh_offset = off;
516531
shp->sh_size = dof->dofh_filesz;
517532
shp->sh_addralign = 8;

makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ all:
101101
echo 'export BUILD_i386=1' >> $(BUILD_DIR)/config.sh ; \
102102
tools/mksyscall.pl x86 || exit 1 ; \
103103
esac ; \
104-
$(MAKE) all0
104+
$(MAKE) all0 || tools/bug.sh
105+
105106
all0:
106107
cd libctf ; $(MAKE) $(NOPWD)
107108
cd libdtrace ; $(MAKE) $(NOPWD)

tools/bug.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#! /bin/sh
2+
3+
if [ "$BUG_RUNNING" = 1 ]; then
4+
exit 1
5+
fi
6+
if [ "$BUG_NOBUG" != "" -o -f .dtrace.nobug ]; then
7+
exit 1
8+
fi
9+
10+
export BUG_RUNNING=1
11+
file=/tmp/dtrace-bug.$$
12+
cat <<EOF | tee $file
13+
======================
14+
== Sorry - but dtrace failed to compile on your system.
15+
== Please forward the following file to:
16+
==
17+
== file: $file
18+
== mail: dtrace@crisp.demon.co.uk
19+
==
20+
== and the information provided will be used to help
21+
== enhance the tool and fix the underlying issue.
22+
==
23+
== ======================
24+
(generating a make run - this may take a few moments...)
25+
EOF
26+
27+
(
28+
date
29+
uname -a
30+
gcc -v
31+
ld -v
32+
flex --version
33+
bison --version
34+
cat /proc/cpuinfo | grep processor
35+
grep model /proc/cpuinfo | sort -u
36+
echo =========================
37+
make all
38+
) >$file 2>&1
39+
exit 1

tools/libgcc.pl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,22 @@ sub main
5757
}
5858
}
5959
unlink("x");
60+
61+
###############################################
62+
# Try an alternate tactic - this for AS2. #
63+
###############################################
64+
$fh = new FileHandle("find /usr/lib/gcc-lib -name libgcc.a |");
65+
while (<$fh>) {
66+
chomp;
67+
if (!symlink($_, $target)) {
68+
print "Error creating symlink $target -- $!\n";
69+
exit(1);
70+
}
71+
exit(0);
72+
}
73+
###############################################
74+
# Oh dear. #
75+
###############################################
6076
print "Sorry: libgcc.a not found. Please put a symlink to it in the\n";
6177
print "build/ directory for the 32-bit compilation to work.\n";
6278
}

0 commit comments

Comments
 (0)