hns - 日記自動生成システム - Version 2.19.9

先月 2004年10月 来月
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2004年10月30日() 旧暦 [n年日記] [更新:"2004/11/01 09:08:48"]

#1 [Linux]

Fedore Core 1 の上で linux-ppc 用のクロスコンパイラを作って見る。 が非常に役に立つ。 などを材料にする。--target=sparc-linux と書いてあるところは --target=powerpc--linux とする (ハイフン二つ)。

following part may be wrongly cross-compiled:

samba-3.0.7/source/lib/util-sec.c
/****************************************************************************
abort if we haven't set the uid correctly
****************************************************************************/
static void assert_uid(uid_t ruid, uid_t euid)
{
	if ((euid != (uid_t)-1 && geteuid() != euid) ||
	    (ruid != (uid_t)-1 && getuid() != ruid)) {
		if (!non_root_mode()) {
			DEBUG(0,("Failed to set uid privileges to (%d,%d) now set to (%d,%d)\n",
				 (int)ruid, (int)euid,
				 (int)getuid(), (int)geteuid()));
			smb_panic("failed to set uid\n");
			exit(1);
		}
	}
}

/****************************************************************************
abort if we haven't set the gid correctly
****************************************************************************/
static void assert_gid(gid_t rgid, gid_t egid)
{
	if ((egid != (gid_t)-1 && getegid() != egid) ||
	    (rgid != (gid_t)-1 && getgid() != rgid)) {
		if (!non_root_mode()) {
			DEBUG(0,("Failed to set gid privileges to (%d,%d) now set to (%d,%d) uid=(%d,%d)\n",
				 (int)rgid, (int)egid,
				 (int)getgid(), (int)getegid(),
				 (int)getuid(), (int)geteuid()));
			smb_panic("failed to set gid\n");
			exit(1);
		}
	}
}
I am afraid I did not see -fPIC, -DPIC option when cross compiling being done. The followind line is from NetBSD/macppc native compiling, but I may be wrong:
Compiling lib/util_sec.c with -fPIC -DPIC

patch configure.in, autoconf, make:

patch -s < samba-3.0.5-cross
autoconf
env CC=/usr/local/bin/powerpc--linux-gcc ./configure --host=i386--linux --enable-cross

objdump:

/usr/local/bin/powerpc--objdump -d bin/smbd |less
10190fbc <assert_uid>:
10190fbc:       94 21 ff e0     stwu    r1,-32(r1)

10190fe0:       41 82 00 10     beq-    10190ff0 <assert_uid+0x34>
10190fe4:       48 0d e8 05     bl      1026f7e8 <ports.6+0x6b4>



最近の日記
2024年05月08日
comparison on ./buildsh tools
2024年05月06日
py-setuptools (python 3.11.9)
make release took 1 hours and 10 min
qemu invocation for 10.99.10
2024年05月05日
Windows 10 version
serial connection
bc bench
2024年05月04日
Trial on 10.99.10
another version (later trial) to succeed
2024年04月29日
dkim
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)