You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(9) |
2
(13) |
3
(12) |
4
(4) |
5
(5) |
|
6
(5) |
7
(16) |
8
(9) |
9
(14) |
10
(15) |
11
(7) |
12
(2) |
|
13
(7) |
14
(9) |
15
(8) |
16
(6) |
17
|
18
(2) |
19
(4) |
|
20
|
21
(7) |
22
(12) |
23
(6) |
24
(2) |
25
(3) |
26
(2) |
|
27
(2) |
28
(5) |
29
(7) |
30
(10) |
|
|
|
|
From: <sv...@va...> - 2010-06-14 21:29:47
|
Author: sewardj
Date: 2010-06-14 22:29:35 +0100 (Mon, 14 Jun 2010)
New Revision: 1983
Log:
Implement more SSE4 instructions:
PINSRD PMINUD POPCNTW POPCNTL POPCNTQ
Modified:
trunk/priv/guest_amd64_toIR.c
Modified: trunk/priv/guest_amd64_toIR.c
===================================================================
--- trunk/priv/guest_amd64_toIR.c 2010-06-07 16:22:22 UTC (rev 1982)
+++ trunk/priv/guest_amd64_toIR.c 2010-06-14 21:29:35 UTC (rev 1983)
@@ -741,6 +741,13 @@
toBool((pfx & (PFX_66|PFX_F2|PFX_F3)) == PFX_F3);
}
+/* Return True iff pfx has F3 set and F2 clear */
+static Bool haveF3noF2 ( Prefix pfx )
+{
+ return
+ toBool((pfx & (PFX_F2|PFX_F3)) == PFX_F3);
+}
+
/* Return True iff pfx has 66, F2 and F3 clear */
static Bool haveNo66noF2noF3 ( Prefix pfx )
{
@@ -4334,6 +4341,101 @@
}
+/* Generate an IR sequence to do a popcount operation on the supplied
+ IRTemp, and return a new IRTemp holding the result. 'ty' may be
+ Ity_I16, Ity_I32 or Ity_I64 only. */
+static IRTemp gen_POPCOUNT ( IRType ty, IRTemp src )
+{
+ Int i;
+ if (ty == Ity_I16) {
+ IRTemp old = IRTemp_INVALID;
+ IRTemp nyu = IRTemp_INVALID;
+ IRTemp mask[4], shift[4];
+ for (i = 0; i < 4; i++) {
+ mask[i] = newTemp(ty);
+ shift[i] = 1 << i;
+ }
+ assign(mask[0], mkU16(0x5555));
+ assign(mask[1], mkU16(0x3333));
+ assign(mask[2], mkU16(0x0F0F));
+ assign(mask[3], mkU16(0x00FF));
+ old = src;
+ for (i = 0; i < 4; i++) {
+ nyu = newTemp(ty);
+ assign(nyu,
+ binop(Iop_Add16,
+ binop(Iop_And16,
+ mkexpr(old),
+ mkexpr(mask[i])),
+ binop(Iop_And16,
+ binop(Iop_Shr16, mkexpr(old), mkU8(shift[i])),
+ mkexpr(mask[i]))));
+ old = nyu;
+ }
+ return nyu;
+ }
+ if (ty == Ity_I32) {
+ IRTemp old = IRTemp_INVALID;
+ IRTemp nyu = IRTemp_INVALID;
+ IRTemp mask[5], shift[5];
+ for (i = 0; i < 5; i++) {
+ mask[i] = newTemp(ty);
+ shift[i] = 1 << i;
+ }
+ assign(mask[0], mkU32(0x55555555));
+ assign(mask[1], mkU32(0x33333333));
+ assign(mask[2], mkU32(0x0F0F0F0F));
+ assign(mask[3], mkU32(0x00FF00FF));
+ assign(mask[4], mkU32(0x0000FFFF));
+ old = src;
+ for (i = 0; i < 5; i++) {
+ nyu = newTemp(ty);
+ assign(nyu,
+ binop(Iop_Add32,
+ binop(Iop_And32,
+ mkexpr(old),
+ mkexpr(mask[i])),
+ binop(Iop_And32,
+ binop(Iop_Shr32, mkexpr(old), mkU8(shift[i])),
+ mkexpr(mask[i]))));
+ old = nyu;
+ }
+ return nyu;
+ }
+ if (ty == Ity_I64) {
+ IRTemp old = IRTemp_INVALID;
+ IRTemp nyu = IRTemp_INVALID;
+ IRTemp mask[6], shift[6];
+ for (i = 0; i < 6; i++) {
+ mask[i] = newTemp(ty);
+ shift[i] = 1 << i;
+ }
+ assign(mask[0], mkU64(0x5555555555555555ULL));
+ assign(mask[1], mkU64(0x3333333333333333ULL));
+ assign(mask[2], mkU64(0x0F0F0F0F0F0F0F0FULL));
+ assign(mask[3], mkU64(0x00FF00FF00FF00FFULL));
+ assign(mask[4], mkU64(0x0000FFFF0000FFFFULL));
+ assign(mask[5], mkU64(0x00000000FFFFFFFFULL));
+ old = src;
+ for (i = 0; i < 6; i++) {
+ nyu = newTemp(ty);
+ assign(nyu,
+ binop(Iop_Add64,
+ binop(Iop_And64,
+ mkexpr(old),
+ mkexpr(mask[i])),
+ binop(Iop_And64,
+ binop(Iop_Shr64, mkexpr(old), mkU8(shift[i])),
+ mkexpr(mask[i]))));
+ old = nyu;
+ }
+ return nyu;
+ }
+ /*NOTREACHED*/
+ vassert(0);
+}
+
+
/*------------------------------------------------------------*/
/*--- ---*/
/*--- x87 FLOATING POINT INSTRUCTIONS ---*/
@@ -14247,6 +14349,64 @@
}
+ /* 66 no-REX.W 0F 3A 22 /r ib = PINSRD xmm1, r/m32, imm8
+ Extract Doubleword int from gen.reg/mem32 and insert into xmm1 */
+ if ( have66noF2noF3( pfx )
+ && sz == 2 /* REX.W is NOT present */
+ && insn[0] == 0x0F && insn[1] == 0x3A && insn[2] == 0x22 ) {
+
+ Int imm8_10;
+ IRTemp src_elems = newTemp(Ity_I32);
+ IRTemp src_vec = newTemp(Ity_V128);
+ IRTemp z32 = newTemp(Ity_I32);
+
+ modrm = insn[3];
+
+ if ( epartIsReg( modrm ) ) {
+ imm8_10 = (Int)(insn[3+1] & 3);
+ assign( src_elems, getIReg32( eregOfRexRM(pfx,modrm) ) );
+ delta += 3+1+1;
+ DIP( "pinsrd $%d, %s,%s\n", imm8_10,
+ nameIReg32( eregOfRexRM(pfx, modrm) ),
+ nameXMMReg( gregOfRexRM(pfx, modrm) ) );
+ } else {
+ addr = disAMode( &alen, vbi, pfx, delta+3, dis_buf, 1 );
+ imm8_10 = (Int)(insn[3+alen] & 3);
+ assign( src_elems, loadLE( Ity_I32, mkexpr(addr) ) );
+ delta += 3+alen+1;
+ DIP( "pinsrd $%d, %s,%s\n",
+ imm8_10, dis_buf, nameXMMReg( gregOfRexRM(pfx, modrm) ) );
+ }
+
+ assign(z32, mkU32(0));
+
+ UShort mask = 0;
+ switch (imm8_10) {
+ case 3: mask = 0x0FFF;
+ assign(src_vec, mk128from32s(src_elems, z32, z32, z32));
+ break;
+ case 2: mask = 0xF0FF;
+ assign(src_vec, mk128from32s(z32, src_elems, z32, z32));
+ break;
+ case 1: mask = 0xFF0F;
+ assign(src_vec, mk128from32s(z32, z32, src_elems, z32));
+ break;
+ case 0: mask = 0xFFF0;
+ assign(src_vec, mk128from32s(z32, z32, z32, src_elems));
+ break;
+ default: vassert(0);
+ }
+
+ putXMMReg( gregOfRexRM(pfx, modrm),
+ binop( Iop_OrV128, mkexpr(src_vec),
+ binop( Iop_AndV128,
+ getXMMReg( gregOfRexRM(pfx, modrm) ),
+ mkV128(mask) ) ) );
+
+ goto decode_success;
+ }
+
+
/* 66 0F 38 3D /r = PMAXSD xmm1, xmm2/m128
Maximum of Packed Signed Double Word Integers (XMM)
--
@@ -14305,31 +14465,38 @@
/* 66 0F 38 3F /r = PMAXUD xmm1, xmm2/m128
- Maximum of Packed Unsigned Doubleword Integers (XMM) */
+ Maximum of Packed Unsigned Doubleword Integers (XMM)
+ 66 0F 38 3B /r = PMINUD xmm1, xmm2/m128
+ Minimum of Packed Unsigned Doubleword Integers (XMM) */
if ( have66noF2noF3( pfx )
&& sz == 2
- && insn[0] == 0x0F && insn[1] == 0x38 && insn[2] == 0x3F ) {
+ && insn[0] == 0x0F && insn[1] == 0x38
+ && (insn[2] == 0x3F || insn[2] == 0x3B)) {
+ Bool is_max = insn[2] == 0x3F;
IRTemp reg_vec = newTemp(Ity_V128);
IRTemp rom_vec = newTemp(Ity_V128);
IRTemp mask_vec = newTemp(Ity_V128);
IRTemp and_vec = newTemp(Ity_V128);
IRTemp not_vec = newTemp(Ity_V128);
-
+
modrm = insn[3];
assign( reg_vec, getXMMReg( gregOfRexRM(pfx, modrm) ) );
if ( epartIsReg( modrm ) ) {
assign( rom_vec, getXMMReg( eregOfRexRM(pfx, modrm) ) );
delta += 3+1;
- DIP( "pmaxud %s,%s\n",
+ DIP( "p%sud %s,%s\n",
+ is_max ? "max" : "min",
nameXMMReg( eregOfRexRM(pfx, modrm) ),
nameXMMReg( gregOfRexRM(pfx, modrm) ) );
} else {
addr = disAMode( &alen, vbi, pfx, delta+3, dis_buf, 0 );
assign( rom_vec, loadLE( Ity_V128, mkexpr(addr) ) );
delta += 3+alen;
- DIP( "pmaxud %s,%s\n", dis_buf, nameXMMReg( gregOfRexRM(pfx, modrm) ) );
+ DIP( "p%sd %s,%s\n",
+ is_max ? "max" : "min",
+ dis_buf, nameXMMReg( gregOfRexRM(pfx, modrm) ) );
}
/* the foll. simulates Iop_CmpGT32Ux4 (not implemented)
@@ -14341,9 +14508,12 @@
binop( Iop_SarN32x4, mkexpr(reg_vec), mkU8(31) ) ),
binop( Iop_SarN32x4, mkexpr(rom_vec), mkU8(31) ) ) );
- assign( and_vec, binop( Iop_AndV128, mkexpr(reg_vec), mkexpr(mask_vec) ) );
- assign( not_vec, binop( Iop_AndV128, mkexpr(rom_vec),
- unop( Iop_NotV128, mkexpr(mask_vec) ) ) );
+ assign( and_vec,
+ binop( Iop_AndV128, mkexpr(is_max ? reg_vec : rom_vec),
+ mkexpr(mask_vec) ) );
+ assign( not_vec,
+ binop( Iop_AndV128, mkexpr(is_max ? rom_vec : reg_vec),
+ unop( Iop_NotV128, mkexpr(mask_vec) ) ) );
putXMMReg( gregOfRexRM(pfx, modrm),
binop( Iop_OrV128, mkexpr(not_vec), mkexpr(and_vec) ) );
@@ -14794,6 +14964,49 @@
}
+ /* F3 0F B8 = POPCNT{W,L,Q}
+ Count the number of 1 bits in a register
+ */
+ if (haveF3noF2(pfx) /* so both 66 and 48 are possibilities */
+ && insn[0] == 0x0F && insn[1] == 0xB8) {
+ vassert(sz == 2 || sz == 4 || sz == 8);
+ /*IRType*/ ty = szToITy(sz);
+ IRTemp src = newTemp(ty);
+ modrm = insn[2];
+ if (epartIsReg(modrm)) {
+ assign(src, getIRegE(sz, pfx, modrm));
+ delta += 2+1;
+ DIP("popcnt%c %s, %s\n", nameISize(sz), nameIRegE(sz, pfx, modrm),
+ nameIRegG(sz, pfx, modrm));
+ } else {
+ addr = disAMode( &alen, vbi, pfx, delta+2, dis_buf, 0);
+ assign(src, loadLE(ty, mkexpr(addr)));
+ delta += 2+alen;
+ DIP("popcnt%c %s, %s\n", nameISize(sz), dis_buf,
+ nameIRegG(sz, pfx, modrm));
+ }
+
+ IRTemp result = gen_POPCOUNT(ty, src);
+ putIRegG(sz, pfx, modrm, mkexpr(result));
+
+ // Update flags. This is pretty lame .. perhaps can do better
+ // if this turns out to be performance critical.
+ // O S A C P are cleared. Z is set if SRC == 0.
+ stmt( IRStmt_Put( OFFB_CC_OP, mkU64(AMD64G_CC_OP_COPY) ));
+ stmt( IRStmt_Put( OFFB_CC_DEP2, mkU64(0) ));
+ stmt( IRStmt_Put( OFFB_CC_NDEP, mkU64(0) ));
+ stmt( IRStmt_Put( OFFB_CC_DEP1,
+ binop(Iop_Shl64,
+ unop(Iop_1Uto64,
+ binop(Iop_CmpEQ64,
+ widenUto64(mkexpr(src)),
+ mkU64(0))),
+ mkU8(AMD64G_CC_SHIFT_Z))));
+
+ goto decode_success;
+ }
+
+
/* ---------------------------------------------------- */
/* --- end of the SSE4 decoder --- */
/* ---------------------------------------------------- */
|
|
From: Bart V. A. <bva...@ac...> - 2010-06-14 19:08:13
|
On Mon, Jun 14, 2010 at 7:43 PM, Bart Van Assche <bva...@ac...> wrote:
>
> On Mon, Jun 14, 2010 at 2:20 AM, Julian Seward <js...@ac...> wrote:
> >
> > On Sunday, June 13, 2010, Bart Van Assche wrote:
> > > It took some time before I noticed, but the patch below triggers the
> > > following warnings during compilation on PPC (make check):
> > >
> > > [ ... ]
> > > g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -I../../coregrind
> > > -I../ ../include -I../../VEX/pub -DVGA_ppc64=1 -DVGO_linux=1
> > > -DVGP_ppc64_linux=1 -Win line -Wall -Wshadow -g -m64 -g -O2 -MT
> > > valgrind_cpp_test.o -MD -MP -MF .deps/val grind_cpp_test.Tpo -c -o
> > > valgrind_cpp_test.o valgrind_cpp_test.cpp In file included from
> > > ../../include/pub_tool_vki.h:49,
> > > from valgrind_cpp_test.cpp:14:
> > > ../../include/vki/vki-linux.h:2159: warning: division by zero
> > > ../../include/vki/vki-linux.h:2162: warning: division by zero
> > > [ ... ]
> >
> > (btw, I'm sure Konstantin S et al grappled with this at some time in
> > the past.)
> >
> > > Would it be OK to rewrite the _VKI_IOC_TYPECHECK() macro and to base
> > > it on something similar to BUILD_BUG_ON() as present in the Linux
> > > kernel ?
> >
> > Sounds good. This is the old trick where for doing compile time
> > assertions, in resulting in declaration of an array of size -1 if
> > the assertion fails, yes?
>
> That trick worked until gcc allowed variable length arrays. The
> addition of support for variable length arrays in gcc caused gcc no
> longer to complain when the tested expression is not a constant. The
> current definition of BUILD_BUG_ON() is as follows:
>
> /* Force a compilation error if condition is true */
> #define BUILD_BUG_ON(condition) ((void)BUILD_BUG_ON_ZERO(condition))
> * Force a compilation error if condition is true, but also produce a
> result (of value 0 and type size_t), so the expression can be used
> e.g. in a structure initializer (or where-ever else comma expressions
> aren't permitted). */
> #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
>
> For more information, see also:
> * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=include/linux/kernel.h
> * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=8c87df457cb58fe75b9b893007917cf8095660a0.
>
> > Only comment is that BUILD_BUG_ON is a terrible name (what does it
> > mean?) I'd prefer STATIC_ASSERT or something similar.
>
> Agreed.
Apparently this is not as easy to fix as I thought. The macros
#define VKI_STATIC_ASSERT(expr) (sizeof(struct { int:-!(expr); }))
#define _VKI_IOC_TYPECHECK(t) \
(VKI_STATIC_ASSERT((sizeof(t) == sizeof(t[1]) \
&& sizeof(t) < (1 << _VKI_IOC_SIZEBITS))) \
+ sizeof(t))
result in the following warnings on PPC during make check:
In file included from ../../include/pub_tool_vki.h:49,
from valgrind_cpp_test.cpp:14:
../../include/vki/vki-linux.h:2159: error: types may not be defined in
'sizeof' expressions
../../include/vki/vki-linux.h:2162: error: types may not be defined in
'sizeof' expressions
Bart.
Bart.
|
|
From: <sv...@va...> - 2010-06-14 18:13:06
|
Author: bart
Date: 2010-06-14 19:12:56 +0100 (Mon, 14 Jun 2010)
New Revision: 11176
Log:
Fixed compiler warnings about casting from const char * to char *.
Modified:
trunk/coregrind/m_clientstate.c
trunk/coregrind/m_initimg/initimg-pathscan.c
trunk/coregrind/m_initimg/priv_initimg_pathscan.h
trunk/coregrind/m_main.c
trunk/include/pub_tool_clientstate.h
Modified: trunk/coregrind/m_clientstate.c
===================================================================
--- trunk/coregrind/m_clientstate.c 2010-06-14 00:02:27 UTC (rev 11175)
+++ trunk/coregrind/m_clientstate.c 2010-06-14 18:12:56 UTC (rev 11176)
@@ -75,7 +75,7 @@
/* The name of the client executable, as specified on the command
line. */
-HChar* VG_(args_the_exename) = NULL;
+const HChar* VG_(args_the_exename) = NULL;
// Client's original rlimit data and rlimit stack
struct vki_rlimit VG_(client_rlimit_data);
Modified: trunk/coregrind/m_initimg/initimg-pathscan.c
===================================================================
--- trunk/coregrind/m_initimg/initimg-pathscan.c 2010-06-14 00:02:27 UTC (rev 11175)
+++ trunk/coregrind/m_initimg/initimg-pathscan.c 2010-06-14 18:12:56 UTC (rev 11176)
@@ -130,7 +130,7 @@
}
// Returns NULL if it wasn't found.
-HChar* ML_(find_executable) ( HChar* exec )
+HChar* ML_(find_executable) ( const HChar* exec )
{
vg_assert(NULL != exec);
if (VG_(strchr)(exec, '/')) {
Modified: trunk/coregrind/m_initimg/priv_initimg_pathscan.h
===================================================================
--- trunk/coregrind/m_initimg/priv_initimg_pathscan.h 2010-06-14 00:02:27 UTC (rev 11175)
+++ trunk/coregrind/m_initimg/priv_initimg_pathscan.h 2010-06-14 18:12:56 UTC (rev 11176)
@@ -32,6 +32,6 @@
#ifndef __PRIV_INITIMG_PATHSCAN_H
#define __PRIV_INITIMG_PATHSCAN_
-extern HChar* ML_(find_executable) ( HChar* exec );
+extern HChar* ML_(find_executable) ( const HChar* exec );
#endif
Modified: trunk/coregrind/m_main.c
===================================================================
--- trunk/coregrind/m_main.c 2010-06-14 00:02:27 UTC (rev 11175)
+++ trunk/coregrind/m_main.c 2010-06-14 18:12:56 UTC (rev 11176)
@@ -1016,7 +1016,7 @@
/*====================================================================*/
// Print the command, escaping any chars that require it.
-static void umsg_or_xml_arg(Char* arg,
+static void umsg_or_xml_arg(const Char* arg,
UInt (*umsg_or_xml)( const HChar*, ... ) )
{
SizeT len = VG_(strlen)(arg);
@@ -1855,7 +1855,7 @@
HChar buf[50], buf2[50+64];
HChar nul[1];
Int fd, r;
- HChar* exename;
+ const HChar* exename;
VG_(debugLog)(1, "main", "Create fake /proc/<pid>/cmdline\n");
Modified: trunk/include/pub_tool_clientstate.h
===================================================================
--- trunk/include/pub_tool_clientstate.h 2010-06-14 00:02:27 UTC (rev 11175)
+++ trunk/include/pub_tool_clientstate.h 2010-06-14 18:12:56 UTC (rev 11176)
@@ -60,7 +60,7 @@
/* The name of the client executable, as specified on the command
line. */
-extern HChar* VG_(args_the_exename);
+extern const HChar* VG_(args_the_exename);
#endif // __PUB_TOOL_CLIENTSTATE_H
|
|
From: Bart V. A. <bva...@ac...> - 2010-06-14 17:43:18
|
On Mon, Jun 14, 2010 at 2:20 AM, Julian Seward <js...@ac...> wrote:
>
> On Sunday, June 13, 2010, Bart Van Assche wrote:
> > It took some time before I noticed, but the patch below triggers the
> > following warnings during compilation on PPC (make check):
> >
> > [ ... ]
> > g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -I../../coregrind
> > -I../ ../include -I../../VEX/pub -DVGA_ppc64=1 -DVGO_linux=1
> > -DVGP_ppc64_linux=1 -Win line -Wall -Wshadow -g -m64 -g -O2 -MT
> > valgrind_cpp_test.o -MD -MP -MF .deps/val grind_cpp_test.Tpo -c -o
> > valgrind_cpp_test.o valgrind_cpp_test.cpp In file included from
> > ../../include/pub_tool_vki.h:49,
> > from valgrind_cpp_test.cpp:14:
> > ../../include/vki/vki-linux.h:2159: warning: division by zero
> > ../../include/vki/vki-linux.h:2162: warning: division by zero
> > [ ... ]
>
> (btw, I'm sure Konstantin S et al grappled with this at some time in
> the past.)
>
> > Would it be OK to rewrite the _VKI_IOC_TYPECHECK() macro and to base
> > it on something similar to BUILD_BUG_ON() as present in the Linux
> > kernel ?
>
> Sounds good. This is the old trick where for doing compile time
> assertions, in resulting in declaration of an array of size -1 if
> the assertion fails, yes?
That trick worked until gcc allowed variable length arrays. The
addition of support for variable length arrays in gcc caused gcc no
longer to complain when the tested expression is not a constant. The
current definition of BUILD_BUG_ON() is as follows:
/* Force a compilation error if condition is true */
#define BUILD_BUG_ON(condition) ((void)BUILD_BUG_ON_ZERO(condition))
* Force a compilation error if condition is true, but also produce a
result (of value 0 and type size_t), so the expression can be used
e.g. in a structure initializer (or where-ever else comma expressions
aren't permitted). */
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
For more information, see also:
* http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=include/linux/kernel.h
* http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=8c87df457cb58fe75b9b893007917cf8095660a0.
> Only comment is that BUILD_BUG_ON is a terrible name (what does it
> mean?) I'd prefer STATIC_ASSERT or something similar.
Agreed.
Bart.
|
|
From: Bart V. A. <bva...@ac...> - 2010-06-14 07:58:29
|
Nightly build on cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2010-06-14 02:27:53 EDT Ended at 2010-06-14 03:58:12 EDT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 459 tests, 42 stderr failures, 10 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/linux/timerfd-syscall (stdout) memcheck/tests/linux-syscalls-2007 (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stdout) memcheck/tests/wrap8 (stderr) none/tests/empty-exe (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc23_bogus_condwait (stderr) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/hsg (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) |
|
From: Tom H. <th...@cy...> - 2010-06-14 02:45:52
|
Nightly build on lloyd ( x86_64, Fedora 7 ) Started at 2010-06-14 03:05:05 BST Ended at 2010-06-14 03:45:41 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 543 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) |
|
From: Tom H. <th...@cy...> - 2010-06-14 02:36:39
|
Nightly build on mg ( x86_64, Fedora 9 ) Started at 2010-06-14 03:10:06 BST Ended at 2010-06-14 03:36:25 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 550 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) |
|
From: Julian S. <js...@ac...> - 2010-06-14 00:23:33
|
On Sunday, June 13, 2010, Bart Van Assche wrote: > It took some time before I noticed, but the patch below triggers the > following warnings during compilation on PPC (make check): > > [ ... ] > g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -I../../coregrind > -I../ ../include -I../../VEX/pub -DVGA_ppc64=1 -DVGO_linux=1 > -DVGP_ppc64_linux=1 -Win line -Wall -Wshadow -g -m64 -g -O2 -MT > valgrind_cpp_test.o -MD -MP -MF .deps/val grind_cpp_test.Tpo -c -o > valgrind_cpp_test.o valgrind_cpp_test.cpp In file included from > ../../include/pub_tool_vki.h:49, > from valgrind_cpp_test.cpp:14: > ../../include/vki/vki-linux.h:2159: warning: division by zero > ../../include/vki/vki-linux.h:2162: warning: division by zero > [ ... ] (btw, I'm sure Konstantin S et al grappled with this at some time in the past.) > Would it be OK to rewrite the _VKI_IOC_TYPECHECK() macro and to base > it on something similar to BUILD_BUG_ON() as present in the Linux > kernel ? Sounds good. This is the old trick where for doing compile time assertions, in resulting in declaration of an array of size -1 if the assertion fails, yes? Only comment is that BUILD_BUG_ON is a terrible name (what does it mean?) I'd prefer STATIC_ASSERT or something similar. J |
|
From: <sv...@va...> - 2010-06-14 00:02:37
|
Author: sewardj
Date: 2010-06-14 01:02:27 +0100 (Mon, 14 Jun 2010)
New Revision: 11175
Log:
Merge from trunk, r11174 (remove link_tool_exe.c and replace it with
perl scripts that do the same thing) and parts of 11164/11169
(check for --build-id=none at configure time).
Added:
branches/MACOSX106/coregrind/link_tool_exe_aix5.in
branches/MACOSX106/coregrind/link_tool_exe_darwin.in
branches/MACOSX106/coregrind/link_tool_exe_linux.in
Removed:
branches/MACOSX106/coregrind/link_tool_exe.c
Modified:
branches/MACOSX106/Makefile.tool.am
branches/MACOSX106/cachegrind/Makefile.am
branches/MACOSX106/callgrind/Makefile.am
branches/MACOSX106/configure.in
branches/MACOSX106/coregrind/Makefile.am
branches/MACOSX106/drd/Makefile.am
branches/MACOSX106/exp-bbv/Makefile.am
branches/MACOSX106/exp-ptrcheck/Makefile.am
branches/MACOSX106/helgrind/Makefile.am
branches/MACOSX106/lackey/Makefile.am
branches/MACOSX106/massif/Makefile.am
branches/MACOSX106/memcheck/Makefile.am
branches/MACOSX106/none/Makefile.am
Modified: branches/MACOSX106/Makefile.tool.am
===================================================================
--- branches/MACOSX106/Makefile.tool.am 2010-06-13 22:13:58 UTC (rev 11174)
+++ branches/MACOSX106/Makefile.tool.am 2010-06-14 00:02:27 UTC (rev 11175)
@@ -26,13 +26,16 @@
endif
+# -Wl,--build-id=none is needed when linking tools on Linux. Without this
+# flag newer ld versions (2.20 and later) create a .note.gnu.build-id at the
+# default text segment address, which of course means the resulting executable
+# is unusable. So we have to tell ld not to generate that, with --build-id=none.
TOOL_LDFLAGS_COMMON_LINUX = \
- -static -nodefaultlibs -nostartfiles -u _start
+ -static -nodefaultlibs -nostartfiles -u _start @FLAG_NO_BUILD_ID@
TOOL_LDFLAGS_COMMON_AIX5 = \
-static -Wl,-e_start_valgrind
TOOL_LDFLAGS_COMMON_DARWIN = \
- -nodefaultlibs -nostartfiles \
- -Wl,-u,__start -Wl,-e,__start -Wl,-bind_at_load /usr/lib/dyld
+ -nodefaultlibs -nostartfiles -Wl,-u,__start -Wl,-e,__start
TOOL_LDFLAGS_X86_LINUX = \
$(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@
Modified: branches/MACOSX106/cachegrind/Makefile.am
===================================================================
--- branches/MACOSX106/cachegrind/Makefile.am 2010-06-13 22:13:58 UTC (rev 11174)
+++ branches/MACOSX106/cachegrind/Makefile.am 2010-06-14 00:02:27 UTC (rev 11175)
@@ -59,7 +59,7 @@
cachegrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
cachegrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_PRI@ \
$(LINK) \
$(cachegrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \
@@ -79,7 +79,7 @@
cachegrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
cachegrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_SEC@ \
$(LINK) \
$(cachegrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
Modified: branches/MACOSX106/callgrind/Makefile.am
===================================================================
--- branches/MACOSX106/callgrind/Makefile.am 2010-06-13 22:13:58 UTC (rev 11174)
+++ branches/MACOSX106/callgrind/Makefile.am 2010-06-14 00:02:27 UTC (rev 11175)
@@ -66,7 +66,7 @@
callgrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
callgrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_PRI@ \
$(LINK) \
$(callgrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \
@@ -86,7 +86,7 @@
callgrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
callgrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_SEC@ \
$(LINK) \
$(callgrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
Modified: branches/MACOSX106/configure.in
===================================================================
--- branches/MACOSX106/configure.in 2010-06-13 22:13:58 UTC (rev 11174)
+++ branches/MACOSX106/configure.in 2010-06-14 00:02:27 UTC (rev 11175)
@@ -251,11 +251,6 @@
VGCONF_OS="aix5"
;;
- *freebsd*)
- AC_MSG_RESULT([ok (${host_os})])
- VGCONF_OS="freebsd"
- ;;
-
*darwin*)
AC_MSG_RESULT([ok (${host_os})])
VGCONF_OS="darwin"
@@ -1335,6 +1330,28 @@
CFLAGS=$safe_CFLAGS
+# does the linker support -Wl,--build-id=none ? Note, it's
+# important that we test indirectly via whichever C compiler
+# is selected, rather than testing /usr/bin/ld or whatever
+# directly.
+
+AC_MSG_CHECKING([if the linker accepts -Wl,--build-id=none])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-Wl,--build-id=none"
+
+AC_LINK_IFELSE(
+[AC_LANG_PROGRAM([ ], [return 0;])],
+[
+ AC_SUBST([FLAG_NO_BUILD_ID], ["-Wl,--build-id=none"])
+ AC_MSG_RESULT([yes])
+], [
+ AC_SUBST([FLAG_NO_BUILD_ID], [""])
+ AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+
# does the ppc assembler support "mtocrf" et al?
AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf])
@@ -1902,6 +1919,12 @@
exp-bbv/tests/ppc32-linux/Makefile
exp-bbv/tests/arm-linux/Makefile
])
+AC_CONFIG_FILES([coregrind/link_tool_exe_linux],
+ [chmod +x coregrind/link_tool_exe_linux])
+AC_CONFIG_FILES([coregrind/link_tool_exe_darwin],
+ [chmod +x coregrind/link_tool_exe_darwin])
+AC_CONFIG_FILES([coregrind/link_tool_exe_aix5],
+ [chmod +x coregrind/link_tool_exe_aix5])
AC_OUTPUT
cat<<EOF
Modified: branches/MACOSX106/coregrind/Makefile.am
===================================================================
--- branches/MACOSX106/coregrind/Makefile.am 2010-06-13 22:13:58 UTC (rev 11174)
+++ branches/MACOSX106/coregrind/Makefile.am 2010-06-14 00:02:27 UTC (rev 11175)
@@ -430,27 +430,6 @@
endif
#----------------------------------------------------------------------------
-# link_tool_exe, the wrapper for the system linker
-#----------------------------------------------------------------------------
-
-noinst_PROGRAMS += link_tool_exe
-
-link_tool_exe_SOURCES = link_tool_exe.c
-link_tool_exe_CPPFLAGS = $(AM_CPPFLAGS_PRI)
-link_tool_exe_CFLAGS = $(AM_CFLAGS_PRI)
-link_tool_exe_CCASFLAGS = $(AM_CCASFLAGS_PRI)
-link_tool_exe_LDFLAGS = $(AM_CFLAGS_PRI)
-
-# force link_tool_exe to be built before libcoregrind.a is, and hence
-# before any of the tool executables are linked, since they in turn
-# are dependent on libcoregrind.a. Unfortunately this doesn't give a
-# dependence on link_tool_exe.c: ideally if link_tool_exe.c is
-# changed, then 'make' rebuilds link_tool_exe, but the tool
-# executables themselves are not relinked. I can't figure out how
-# to get that to happen.
-BUILT_SOURCES += link_tool_exe
-
-#----------------------------------------------------------------------------
# General stuff
#----------------------------------------------------------------------------
Deleted: branches/MACOSX106/coregrind/link_tool_exe.c
===================================================================
--- branches/MACOSX106/coregrind/link_tool_exe.c 2010-06-13 22:13:58 UTC (rev 11174)
+++ branches/MACOSX106/coregrind/link_tool_exe.c 2010-06-14 00:02:27 UTC (rev 11175)
@@ -1,294 +0,0 @@
-
-/* This program handles linking the tool executables, statically and
- at an alternative load address. Linking them statically sidesteps
- all sorts of complications to do with having two copies of the
- dynamic linker (valgrind's and the client's) coexisting in the same
- process. The alternative load address is needed because Valgrind
- itself will load the client at whatever address it specifies, which
- is almost invariably the default load address. Hence we can't
- allow Valgrind itself (viz, the tool executable) to be loaded at
- that address.
-
- Unfortunately there's no standard way to do 'static link at
- alternative address', so this program handles the per-platform
- hoop-jumping.
-*/
-
-/* What we get passed here is:
- first arg
- the alternative load address
- all the rest of the args
- the gcc invokation to do the final link, that
- the build system would have done, left to itself
-
- We just let assertions fail rather than do proper error reporting.
- We don't expect the users to run this directly. It is only run
- from as part of the build process, with carefully constrained
- inputs.
-*/
-
-/* ------------------------- LINUX ------------------------- */
-
-#if defined(VGO_linux)
-
-/* Scheme is simple: pass the specified command to the linker as-is,
- except, add "-static" and "-Ttext=<argv[1]>" to it.
-
- Also apparently we need --build-id=none. For older ld's (2.18
- vintage) the first two flags are fine. For newer ones (2.20), a
- .note.gnu.build-id is nevertheless created at the default text
- segment address, which of course means the resulting executable is
- unusable. So we have to tell ld not to generate that, with
- --build-id=none.
-
- As to "how far back is this flag supported", it's available at
- least in ld 2.18 and 2.20 and gold 2.20.
-*/
-
-// Don't NDEBUG this; the asserts are necesary for
-// safety checks.
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/wait.h> /* WEXITSTATUS */
-
-int main ( int argc, char** argv )
-{
- int i;
- int/*bool*/ failed = 0;
- size_t reqd = 0;
-
- // expect at least: alt-load-address gcc -o foo bar.o
- assert(argc > 5);
-
- // check for plausible-ish alt load address
- char* ala = argv[1];
- assert(ala[0] == '0');
- assert(ala[1] == 'x');
-
- // We'll need to invoke this to do the linking
- char* gcc = argv[2];
-
- // and the 'restargs' are argv[3 ..]
-
- // so, build up the complete command here:
- // 'gcc' -static -Ttext='ala' 'restargs'
-
- // first, do length safety checks
- reqd += 1+ strlen(gcc);
- reqd += 1+ 100/*let's say*/ + strlen(ala);
- for (i = 3; i < argc; i++)
- reqd += 1+ strlen(argv[i]);
-
- reqd += 1;
- char* cmd = calloc(reqd,1);
- assert(cmd);
-
- char ttext[100];
- assert(strlen(ala) < 30);
- memset(ttext, 0, sizeof(ttext));
- sprintf(ttext, " -static -Wl,-Ttext=%s -Wl,--build-id=none", ala);
-
- strcpy(cmd, gcc);
- strcat(cmd, ttext);
- for (i = 3; i < argc; i++) {
- strcat(cmd, " ");
- strcat(cmd, argv[i]);
- }
-
- assert(cmd[reqd-1] == 0);
-
- if (0) printf("\n");
- printf("link_tool_exe: %s\n", cmd);
- if (0) printf("\n");
-
- int r = system(cmd);
- if (r == -1 || WEXITSTATUS(r) != 0)
- failed = 1;
-
- free(cmd);
-
- // return the result of system.
- return failed ? 1 : 0;
-}
-
-/* ------------------------- DARWIN ------------------------ */
-
-#elif defined(VGO_darwin)
-
-/* Plan is: look at the specified gcc invokation. Ignore all parts of
- it except the *.a, *.o and -o outfile parts. Wrap them up in a new
- command which looks (eg) as follows:
-
- (64-bit):
-
- /usr/bin/ld -static -arch x86_64 -macosx_version_min 10.5 \
- -o memcheck-amd64-darwin -u __start -e __start \
- -image_base 0x138000000 -stack_addr 0x13c000000 \
- -stack_size 0x800000 \
- memcheck_amd*.o \
- ../coregrind/libcoregrind-amd64-darwin.a \
- ../VEX/libvex-amd64-darwin.a
-
- (32-bit)
-
- /usr/bin/ld -static -arch i386 -macosx_version_min 10.5 \
- -o memcheck-x86-darwin -u __start -e __start \
- -image_base 0x38000000 -stack_addr 0x3c000000 \
- -stack_size 0x800000 \
- memcheck_x86*.o \
- ../coregrind/libcoregrind-x86-darwin.a \
- ../VEX/libvex-x86-darwin.a
-
- The addresses shown above will actually work, although "for real" we
- of course need to take it from argv[1]. In these examples the stack
- is placed 64M after the executable start. It is probably safer to
- place it 64M before the executable's start point, so the executable
- + data + bss can grow arbitrarily in future without colliding with
- the stack.
-
- There's one more twist: this executable (for the program in this
- file) could be compiled as either 32- or 64-bit. That has no
- bearing at all on the word size of the executable for which we are
- linking. We need to know the latter since we need to hand to the
- linker, "-arch x86_64" or "-arch i386". Fortunately we can figure
- this out by scanning the gcc invokation, which itself must contain
- either "-arch x86_64" or "-arch i386".
-*/
-
-/* user configurable constants: how far before the exe should we
- place the stack? */
-#define TX_STACK_OFFSET_BEFORE_TEXT (64 * 1024 * 1024)
-/* and how big should the stack be */
-#define TX_STACK_SIZE (8 * 1024 * 1024)
-
-
-// Don't NDEBUG this; the asserts are necesary for
-// safety checks.
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-static void add_to ( char** str, size_t* str_sz, char* to_add )
-{
- size_t needed = strlen(to_add) +2/*paranoia*/;
- size_t currlen = strlen(*str);
- assert(currlen < *str_sz);
-
- while (needed >= *str_sz - currlen) {
- *str = realloc(*str, 2 * *str_sz);
- assert(*str);
- (*str_sz) *= 2;
- }
-
- assert(currlen < *str_sz);
- assert(needed < *str_sz - currlen);
- strcat(*str, to_add);
-}
-
-static int/*bool*/ is_dota_or_doto ( char* str )
-{
- assert(str);
- size_t n = strlen(str);
- if (n < 2) return 0;
- if (str[n-2] == '.' && (str[n-1] == 'a' || str[n-1] == 'o'))
- return 1;
- return 0;
-}
-
-/* Run the specified command as-is; ignore the specified load address
- (argv[1]). */
-
-int main ( int argc, char** argv )
-{
- int i;
- int/*bool*/ failed = 0;
-
- // expect at least: alt-load-address gcc -o foo bar.o
- assert(argc > 5);
-
- // check for plausible-ish alt load address, and get hold
- // of it
- char* ala_str = argv[1];
- unsigned long long int ala = 0;
-
- assert(ala_str[0] == '0');
- assert(ala_str[1] == 'x');
-
- int r = sscanf(ala_str, "0x%llx", &ala);
- assert(r == 1);
-
- // get hold of the outfile name
- char* outfile_name = NULL;
- for (i = 1; i < argc-1; i++) {
- if (0 == strcmp(argv[i], "-o")) {
- outfile_name = argv[i+1];
- break;
- }
- }
- assert(outfile_name);
-
- // get hold of the string following -arch
- char* arch_str = NULL;
- for (i = 1; i < argc-1; i++) {
- if (0 == strcmp(argv[i], "-arch")) {
- arch_str = argv[i+1];
- break;
- }
- }
- assert(arch_str);
-
- // build the command line
- size_t cmd_sz = 1;
- char* cmd = calloc(cmd_sz, 1);
- assert(cmd);
-
- add_to(&cmd, &cmd_sz, "/usr/bin/ld");
- add_to(&cmd, &cmd_sz, " -static");
- add_to(&cmd, &cmd_sz, " -arch ");
- add_to(&cmd, &cmd_sz, arch_str);
- add_to(&cmd, &cmd_sz, " -macosx_version_min 10.5");
- add_to(&cmd, &cmd_sz, " -o ");
- add_to(&cmd, &cmd_sz, outfile_name);
- add_to(&cmd, &cmd_sz, " -u __start -e __start");
-
- char buf[40];
- sprintf(buf, "0x%llx", ala);
- add_to(&cmd, &cmd_sz, " -image_base ");
- add_to(&cmd, &cmd_sz, buf);
-
- sprintf(buf, "0x%llx", ala - TX_STACK_OFFSET_BEFORE_TEXT);
- add_to(&cmd, &cmd_sz, " -stack_addr ");
- add_to(&cmd, &cmd_sz, buf);
-
- sprintf(buf, "0x%llx", (unsigned long long int)TX_STACK_SIZE);
- add_to(&cmd, &cmd_sz, " -stack_size ");
- add_to(&cmd, &cmd_sz, buf);
-
- for (i = 3; i < argc; i++) {
- if (is_dota_or_doto(argv[i])) {
- add_to(&cmd, &cmd_sz, " ");
- add_to(&cmd, &cmd_sz, argv[i]);
- }
- }
-
- if (0) printf("\n");
- printf("link_tool_exe: %s\n", cmd);
- if (0) printf("\n");
-
- r = system(cmd);
- if (r == -1 || WEXITSTATUS(r) != 0)
- failed = 1;
-
- free(cmd);
-
- // return the result of system.
- return failed ? 1 : 0;
-}
-
-
-#else
-# error "Unsupported OS"
-#endif
Copied: branches/MACOSX106/coregrind/link_tool_exe_aix5.in (from rev 11174, trunk/coregrind/link_tool_exe_aix5.in)
===================================================================
--- branches/MACOSX106/coregrind/link_tool_exe_aix5.in (rev 0)
+++ branches/MACOSX106/coregrind/link_tool_exe_aix5.in 2010-06-14 00:02:27 UTC (rev 11175)
@@ -0,0 +1,6 @@
+#! @PERL@
+
+use warnings;
+use strict;
+
+die "link_tool_exe_@VGCONF_OS@ requires implementation";
Copied: branches/MACOSX106/coregrind/link_tool_exe_darwin.in (from rev 11174, trunk/coregrind/link_tool_exe_darwin.in)
===================================================================
--- branches/MACOSX106/coregrind/link_tool_exe_darwin.in (rev 0)
+++ branches/MACOSX106/coregrind/link_tool_exe_darwin.in 2010-06-14 00:02:27 UTC (rev 11175)
@@ -0,0 +1,173 @@
+#! @PERL@
+
+# This script handles linking the tool executables on Linux,
+# statically and at an alternative load address.
+#
+# Linking statically sidesteps all sorts of complications to do with
+# having two copies of the dynamic linker (valgrind's and the
+# client's) coexisting in the same process. The alternative load
+# address is needed because Valgrind itself will load the client at
+# whatever address it specifies, which is almost invariably the
+# default load address. Hence we can't allow Valgrind itself (viz,
+# the tool executable) to be loaded at that address.
+#
+# Unfortunately there's no standard way to do 'static link at
+# alternative address', so these link_tool_exe_*.in scripts handle
+# the per-platform hoop-jumping.
+#
+# What we get passed here is:
+# first arg
+# the alternative load address
+# all the rest of the args
+# the gcc invokation to do the final link, that
+# the build system would have done, left to itself
+#
+# We just let the script 'die' if something is wrong, rather than do
+# proper error reporting. We don't expect the users to run this
+# directly. It is only run as part of the build process, with
+# carefully constrained inputs.
+#
+#
+# So: what we actually do is:
+#
+# Look at the specified gcc invokation. Ignore all parts of it except
+# the *.a, *.o and -o outfile parts. Wrap them up in a new command
+# which looks (eg) as follows:
+#
+# (64-bit):
+#
+# /usr/bin/ld -static -arch x86_64 -macosx_version_min 10.5 \
+# -o memcheck-amd64-darwin -u __start -e __start \
+# -image_base 0x138000000 -stack_addr 0x13c000000 \
+# -stack_size 0x800000 \
+# memcheck_amd*.o \
+# ../coregrind/libcoregrind-amd64-darwin.a \
+# ../VEX/libvex-amd64-darwin.a
+#
+# (32-bit)
+#
+# /usr/bin/ld -static -arch i386 -macosx_version_min 10.5 \
+# -o memcheck-x86-darwin -u __start -e __start \
+# -image_base 0x38000000 -stack_addr 0x3c000000 \
+# -stack_size 0x800000 \
+# memcheck_x86*.o \
+# ../coregrind/libcoregrind-x86-darwin.a \
+# ../VEX/libvex-x86-darwin.a
+#
+# The addresses shown above will actually work, although "for real" we
+# of course need to take it from argv[1]. In these examples the stack
+# is placed 64M after the executable start. It is probably safer to
+# place it 64M before the executable's start point, so the executable
+# + data + bss can grow arbitrarily in future without colliding with
+# the stack.
+#
+# There's one more twist: we need to know the word size of the
+# executable for which we are linking. We need to know this because
+# we must tell the linker that, by handing it either "-arch x86_64" or
+# "-arch i386". Fortunately we can figure this out by scanning the
+# gcc invokation, which itself must contain either "-arch x86_64" or
+# "-arch i386".
+
+use warnings;
+use strict;
+# we need to be able to do 64-bit arithmetic:
+use Math::BigInt;
+
+
+# User configurable constants: how far before the exe should we
+# place the stack?
+my $TX_STACK_OFFSET_BEFORE_TEXT = 64 * 1024 * 1024;
+
+# and how big should the stack be?
+my $TX_STACK_SIZE = 8 * 1024 * 1024;
+
+
+# string -> bool
+sub is_dota_or_doto($)
+{
+ my ($str) = @_;
+ if ($str =~ /.\.a$/ || $str =~ /.\.o$/) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+
+# expect at least: alt-load-address gcc -o foo bar.o
+die "Not enougn arguments"
+ if (($#ARGV + 1) < 5);
+
+my $ala = $ARGV[0];
+
+# check for plausible-ish alt load address
+die "Bogus alt-load address (1)"
+ if (length($ala) < 3 || index($ala, "0x") != 0);
+
+die "Bogus alt-load address (2)"
+ if ($ala !~ /^0x[0-9a-fA-F]+$/);
+
+
+# get hold of the outfile name (following "-o")
+my $outname = "";
+
+foreach my $n (2 .. $#ARGV - 1) {
+ my $str = $ARGV[$n];
+ if ($str eq "-o" && $outname eq "") {
+ $outname = $ARGV[$n + 1];
+ }
+}
+
+die "Can't find '-o outfilename' in command line"
+ if ($outname eq "");
+
+
+# get hold of the string following "-arch"
+my $archstr = "";
+
+foreach my $n (2 .. $#ARGV - 1) {
+ my $str = $ARGV[$n];
+ if ($str eq "-arch" && $archstr eq "") {
+ $archstr = $ARGV[$n + 1];
+ }
+}
+
+die "Can't find '-arch archstr' in command line"
+ if ($archstr eq "");
+
+
+# build the command line
+my $cmd = "/usr/bin/ld";
+
+$cmd = "$cmd -static";
+$cmd = "$cmd -arch $archstr";
+$cmd = "$cmd -macosx_version_min 10.5";
+$cmd = "$cmd -o $outname";
+$cmd = "$cmd -u __start -e __start";
+
+my $stack_addr = Math::BigInt->new( $ala ) - $TX_STACK_OFFSET_BEFORE_TEXT;
+my $stack_addr_str = $stack_addr->as_hex();
+my $stack_size_str = Math::BigInt::as_hex($TX_STACK_SIZE);
+
+$cmd = "$cmd -image_base $ala";
+$cmd = "$cmd -stack_addr $stack_addr_str";
+$cmd = "$cmd -stack_size $stack_size_str";
+
+foreach my $n (2 .. $#ARGV) {
+ my $str = $ARGV[$n];
+ if (is_dota_or_doto($str)) {
+ $cmd = "$cmd $str";
+ }
+}
+
+print "link_tool_exe_darwin: $cmd\n";
+
+
+# Execute the command:
+my $r = system("$cmd");
+
+if ($r == 0) {
+ exit 0;
+} else {
+ exit 1;
+}
Copied: branches/MACOSX106/coregrind/link_tool_exe_linux.in (from rev 11174, trunk/coregrind/link_tool_exe_linux.in)
===================================================================
--- branches/MACOSX106/coregrind/link_tool_exe_linux.in (rev 0)
+++ branches/MACOSX106/coregrind/link_tool_exe_linux.in 2010-06-14 00:02:27 UTC (rev 11175)
@@ -0,0 +1,88 @@
+#! @PERL@
+
+# This script handles linking the tool executables on Linux,
+# statically and at an alternative load address.
+#
+# Linking statically sidesteps all sorts of complications to do with
+# having two copies of the dynamic linker (valgrind's and the
+# client's) coexisting in the same process. The alternative load
+# address is needed because Valgrind itself will load the client at
+# whatever address it specifies, which is almost invariably the
+# default load address. Hence we can't allow Valgrind itself (viz,
+# the tool executable) to be loaded at that address.
+#
+# Unfortunately there's no standard way to do 'static link at
+# alternative address', so these link_tool_exe_*.in scripts handle
+# the per-platform hoop-jumping.
+#
+# What we get passed here is:
+# first arg
+# the alternative load address
+# all the rest of the args
+# the gcc invokation to do the final link, that
+# the build system would have done, left to itself
+#
+# We just let the script 'die' if something is wrong, rather than do
+# proper error reporting. We don't expect the users to run this
+# directly. It is only run as part of the build process, with
+# carefully constrained inputs.
+#
+# Linux specific complications:
+#
+# - need to support both old GNU ld and gold: use -Ttext= to
+# set the text segment address.
+#
+# - need to pass --build-id=none (that is, -Wl,--build-id=none to
+# gcc) if it accepts it, to ensure the linker doesn't add a
+# notes section which ends up at the default load address and
+# so defeats our attempts to keep that address clear for the
+# client. However, older linkers don't support this flag, so it
+# is tested for by configure.in and is shipped to us as part of
+# argv[2 ..].
+#
+#
+# So: what we actually do:
+#
+# pass the specified command to the linker as-is, except, add
+# "-static" and "-Ttext=<argv[1]>" to it.
+#
+
+use warnings;
+use strict;
+
+# expect at least: alt-load-address gcc -o foo bar.o
+die "Not enougn arguments"
+ if (($#ARGV + 1) < 5);
+
+my $ala = $ARGV[0];
+
+# check for plausible-ish alt load address
+die "Bogus alt-load address"
+ if (length($ala) < 3 || index($ala, "0x") != 0);
+
+# The cc invokation to do the final link
+my $cc = $ARGV[1];
+
+# and the 'restargs' are argv[2 ..]
+
+# so, build up the complete command here:
+# 'cc' -static -Ttext='ala' 'restargs'
+
+my $cmd="$cc -static -Wl,-Ttext=$ala";
+
+# Add the rest of the parameters
+foreach my $n (2 .. $#ARGV) {
+ $cmd = "$cmd $ARGV[$n]";
+}
+
+print "link_tool_exe_linux: $cmd\n";
+
+
+# Execute the command:
+my $r = system("$cmd");
+
+if ($r == 0) {
+ exit 0;
+} else {
+ exit 1;
+}
Modified: branches/MACOSX106/drd/Makefile.am
===================================================================
--- branches/MACOSX106/drd/Makefile.am 2010-06-13 22:13:58 UTC (rev 11174)
+++ branches/MACOSX106/drd/Makefile.am 2010-06-14 00:02:27 UTC (rev 11175)
@@ -79,7 +79,7 @@
drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_PRI@ \
$(LINK) \
$(drd_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \
@@ -99,7 +99,7 @@
drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_SEC@ \
$(LINK) \
$(drd_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
Modified: branches/MACOSX106/exp-bbv/Makefile.am
===================================================================
--- branches/MACOSX106/exp-bbv/Makefile.am 2010-06-13 22:13:58 UTC (rev 11174)
+++ branches/MACOSX106/exp-bbv/Makefile.am 2010-06-14 00:02:27 UTC (rev 11175)
@@ -26,7 +26,7 @@
exp_bbv_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
exp_bbv_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_PRI@ \
$(LINK) \
$(exp_bbv_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \
@@ -46,7 +46,7 @@
exp_bbv_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
exp_bbv_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_SEC@ \
$(LINK) \
$(exp_bbv_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
Modified: branches/MACOSX106/exp-ptrcheck/Makefile.am
===================================================================
--- branches/MACOSX106/exp-ptrcheck/Makefile.am 2010-06-13 22:13:58 UTC (rev 11174)
+++ branches/MACOSX106/exp-ptrcheck/Makefile.am 2010-06-14 00:02:27 UTC (rev 11175)
@@ -39,7 +39,7 @@
exp_ptrcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
exp_ptrcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_PRI@ \
$(LINK) \
$(exp_ptrcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \
@@ -59,7 +59,7 @@
exp_ptrcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
exp_ptrcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_SEC@ \
$(LINK) \
$(exp_ptrcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
Modified: branches/MACOSX106/helgrind/Makefile.am
===================================================================
--- branches/MACOSX106/helgrind/Makefile.am 2010-06-13 22:13:58 UTC (rev 11174)
+++ branches/MACOSX106/helgrind/Makefile.am 2010-06-14 00:02:27 UTC (rev 11175)
@@ -48,7 +48,7 @@
helgrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
helgrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_PRI@ \
$(LINK) \
$(helgrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \
@@ -68,7 +68,7 @@
helgrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
helgrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_SEC@ \
$(LINK) \
$(helgrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
Modified: branches/MACOSX106/lackey/Makefile.am
===================================================================
--- branches/MACOSX106/lackey/Makefile.am 2010-06-13 22:13:58 UTC (rev 11174)
+++ branches/MACOSX106/lackey/Makefile.am 2010-06-14 00:02:27 UTC (rev 11175)
@@ -26,7 +26,7 @@
lackey_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
lackey_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_PRI@ \
$(LINK) \
$(lackey_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \
@@ -46,7 +46,7 @@
lackey_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
lackey_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_SEC@ \
$(LINK) \
$(lackey_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
Modified: branches/MACOSX106/massif/Makefile.am
===================================================================
--- branches/MACOSX106/massif/Makefile.am 2010-06-13 22:13:58 UTC (rev 11174)
+++ branches/MACOSX106/massif/Makefile.am 2010-06-14 00:02:27 UTC (rev 11175)
@@ -36,7 +36,7 @@
massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_PRI@ \
$(LINK) \
$(massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \
@@ -56,7 +56,7 @@
massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_SEC@ \
$(LINK) \
$(massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
Modified: branches/MACOSX106/memcheck/Makefile.am
===================================================================
--- branches/MACOSX106/memcheck/Makefile.am 2010-06-13 22:13:58 UTC (rev 11174)
+++ branches/MACOSX106/memcheck/Makefile.am 2010-06-14 00:02:27 UTC (rev 11175)
@@ -44,7 +44,7 @@
memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_PRI@ \
$(LINK) \
$(memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \
@@ -64,7 +64,7 @@
memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_SEC@ \
$(LINK) \
$(memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
Modified: branches/MACOSX106/none/Makefile.am
===================================================================
--- branches/MACOSX106/none/Makefile.am 2010-06-13 22:13:58 UTC (rev 11174)
+++ branches/MACOSX106/none/Makefile.am 2010-06-14 00:02:27 UTC (rev 11175)
@@ -26,7 +26,7 @@
none_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
none_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_PRI@ \
$(LINK) \
$(none_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \
@@ -46,7 +46,7 @@
none_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = \
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
none_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \
- $(top_builddir)/coregrind/link_tool_exe \
+ $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
@VALT_LOAD_ADDRESS_SEC@ \
$(LINK) \
$(none_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
|