Sponsored Content
Full Discussion: How to compare binaries
Operating Systems Solaris How to compare binaries Post 302197563 by jlliagre on Wednesday 21st of May 2008 07:40:59 AM
Old 05-21-2008
Quote:
Originally Posted by mblank
I have the same two source files. They MUST be compiled with -g debugger option. The binaries are different.
Why are the binaries different if the same source code is compiled with the same compiler options ?
Quote:
But in fact the binaries work the same.
Hopefully !
Quote:
How to compare them to know the are compiled using the same source code. In Linux it is enough to: strip --strip-all <file> and diff shows no difference between binaries, what is what I need. It seems stripping in Solaris does not work for me.
Did you try "gstrip --strip-all" with Solaris ?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Windows Binaries

This is probably a really stupid question: Why doesnt windows binaries run in *nix? Is it the filesystem? or what? //Maestin (3 Replies)
Discussion started by: Maestin
3 Replies

2. HP-UX

Binaries/Depot for Subversion 1.4.3 for HP/UX 11.11

Could anyone help me out by providing binaries/depot for subversion 1.4.3? The hpux version is: HP-UX myhappybox B.11.11 U 9000/800 I am having trouble compiling the sources for hpux, the provided dependancies are extracted, but it continually falls over. We have previously had svn... (3 Replies)
Discussion started by: spud
3 Replies

3. Solaris

compare two binaries.

Dear I want to know how i can compare between two binaries by using check sum command. (2 Replies)
Discussion started by: abu_hassan
2 Replies

4. UNIX for Dummies Questions & Answers

FTP is corrupting binaries

I'm ftping some binaries from a centos box to an old DEC machine. They're being transferred in bin, but they're being corrupted somehow because when I run file filename on the centos machine, it shows that it's an executable. But after the ftp and running the same command on the DEC, the file... (5 Replies)
Discussion started by: krisl
5 Replies

5. UNIX for Dummies Questions & Answers

Stripping down binaries

Hello, I am the CEO of Grand Tech Corporation. We are launching Linux NT and forgive me, but I do not know how to strip binaries down in Mandriva Linux. Can someone tell me a way to?:b: (2 Replies)
Discussion started by: Linux NT
2 Replies

6. UNIX for Dummies Questions & Answers

Why does /bin contain binaries for builtins?

Why do shell builtins like echo and pwd have binaries in /bin? When I do which pwd, I get the one in /bin. that means that I am not using the builtin version? What determines which one gets used? Is the which command a definitive way to determine what is being run when I enter pwd? (16 Replies)
Discussion started by: glev2005
16 Replies

7. Red Hat

Intel binaries on PPC

Is it possible to run binaries compiled for Intel platforms running on linux on a PPC system running on linux? I have a POWER4 IBM system and like to use it as a linux box with all desktop apps on it. (8 Replies)
Discussion started by: rein
8 Replies

8. Shell Programming and Scripting

Script to compare binaries

Hi All, I am very new to scripting and wanted to write a script for comparison of folder including binary files like ear's and jars. Following is the job for which I need it: 1. Compare two folders recursively 2. Compare the binaries like ear's but exclude files like MANIFEST files 3.... (1 Reply)
Discussion started by: maverick.topgun
1 Replies

9. Emergency UNIX and Linux Support

bitwise and between two 32 bit binaries

Hello All, i have two 16 bit binaries that in two different variables, i want to perform a bitwise AND between the two and store the result in a different variable. can anyone throw some light on doing this in a bourne shell... eg var1= 1110101010101011 ... (8 Replies)
Discussion started by: venu
8 Replies

10. Infrastructure Monitoring

Nagios binaries for AIX 7.1

Hello All, I am new to Nagios. I have a requirement to monitor AIX 7.1 using Nagios xi, could any one guide me steps to go in right direction. I know Nagios doesn't have precompiled agent and plugin for aix 7.1. Appreciate your help (1 Reply)
Discussion started by: bsivavani
1 Replies
COMPAT_SVR4(8)						    BSD System Manager's Manual 					    COMPAT_SVR4(8)

NAME
compat_svr4 -- setup procedure for running SVR4/iBCS2 binaries compat_svr4_32 -- setup procedure for running 32-bit SVR4/iBCS2 binaries DESCRIPTION
NetBSD supports running SVR4/iBCS2 binaries. This code has been tested on i386 (with binaries from SCO OpenServer and XENIX), m68k (with binaries from AMIX) and sparc (with binaries from Solaris) systems. Most programs should work, but not ones that use or depend on: kernel internal data structures the /proc filesystem the ticotsord loopback RPC mechanism (NIS uses this) sound and video interfaces threads (ttsession uses threads) the streams administrative driver The SVR4 compatibility feature is active for kernels compiled with the COMPAT_SVR4 option enabled. Since support for ELF executables is included only if the kernel is compiled with the EXEC_ELF32 or EXEC_ELF64 options enabled, kernels which include COMPAT_SVR4 should also typ- ically include EXEC_ELF32 (for 32-bit ELF support) and/or EXEC_ELF64 (for 64-bit ELF support). Another compatibility feature is COMPAT_SVR4_32, which allows the execution of 32-bit SVR4 binaries on a machine with a 64-bit kernel. This requires EXEC_ELF32 and COMPAT_NETBSD32 options as well as COMPAT_SVR4. It is configured the same way as COMPAT_SVR4 but uses the /emul/svr4_32 directory instead of /emul/svr4. But typically, /emul/svr4_32 can be made to point to /emul/svr4 if the operating system donating the libraries has support for both 32-bit and 64-bit binaries. Execution of 32-bit SVR4 binaries on a machine with a 32-bit kernel uses COMPAT_SVR4, not COMPAT_SVR4_32. Most SVR4 programs are dynamically linked. This means that you will also need the shared libraries that the program depends on and the run- time linker. Also, you will need to create a ``shadow root'' directory for SVR4 binaries on your NetBSD system. This directory is named /emul/svr4. Any file operations done by SVR4 programs run under NetBSD will look in this directory first. So, if a SVR4 program opens, for example, /etc/passwd, NetBSD will first try to open /emul/svr4/etc/passwd, and if that does not exist open the 'real' /etc/passwd file. It is recommended that you install SVR4 packages that include configuration files, etc under /emul/svr4, to avoid naming conflicts with possible NetBSD counterparts. Shared libraries should also be installed in the shadow tree. The simplest way to set up your system for SVR4 binaries is: 1. Make the necessary directories: (me@netbsd) mkdir -p /emul/svr4/{dev,etc} (me@netbsd) mkdir -p /emul/svr4/usr/{bin,lib,ucblib} (me@netbsd) mkdir -p /emul/svr4/usr/openwin/{bin,lib} (me@netbsd) mkdir -p /emul/svr4/usr/dt/{bin,lib} 2. Copy files from an svr4 system: (me@svr4) cd /usr/lib (me@svr4) tar -cf - . | rsh netbsd 'cd /emul/svr4/usr/lib && tar -xpf -' (me@svr4) cd /usr/ucblib (me@svr4) tar -cf - . | rsh netbsd 'cd /emul/svr4/usr/ucblib && tar -xpf -' If you are running openwindows: (me@svr4) cd /usr/openwin/lib (me@svr4) tar -cf - . | rsh netbsd 'cd /emul/svr4/usr/openwin/lib && tar -xpf -' (me@svr4) cd /usr/dt/lib (me@svr4) tar -cf - . | rsh netbsd 'cd /emul/svr4/usr/dt/lib && tar -xpf -' 3. You will also probably need the timezone files from your Solaris system, otherwise emulated binaries will run on UTC time. (me@netbsd) mkdir -p /emul/svr4/usr/share/lib/zoneinfo (me@netbsd) mkdir -p /emul/svr4/etc/default (me@svr4) cd /usr/share/lib/zoneinfo (me@solaris) tar -cf -. | rsh netbsd 'cd /emul/svr4/usr/share/lib/zoneinfo && tar -xpf -' (me@netbsd) echo TZ=US/Pacific > /emul/svr4/etc/default/init 4. Set up the configuration files and devices: (me@netbsd) cd /usr/share/examples/emul/svr4/etc (me@netbsd) cp netconfig nsswitch.conf /emul/svr4/etc (me@netbsd) cp SVR4_MAKEDEV /emul/svr4/dev (me@netbsd) cd /emul/svr4/dev && sh SVR4_MAKEDEV all As the major number allocated for emulation of SVR4 devices may vary between NetBSD platforms, the SVR4_MAKEDEV script uses the uname(1) command to determine the architecture the devices nodes are being created for; this can be overridden by setting the MACHINE environment variable accordingly. An alternative method is to mount a whole SVR4 partition in /emul/svr4 and then override with other mounts /emul/svr4/etc and /emul/svr4/dev. BUGS
Many system calls are still not emulated. The streams emulation is incomplete (socketpair does not work yet). Most SVR4 executables can not handle directory offset cookies > 32 bits. More recent ones, compiled for large file support (Solaris 2.6 and up) can. With older programs, you will see the message ``svr4_getdents: dir offset too large for emulated program'' when this happens. Cur- rently, this can only happen on NFS mounted filesystems, mounted from servers that return offsets with information in the upper 32 bits. These errors should rarely happen, but can be avoided by mounting this filesystem with offset translation enabled. See the -X option to mount_nfs(8). The -2 option to mount_nfs(8) will also have the desired effect, but is less preferable. BSD
April 19, 1999 BSD
All times are GMT -4. The time now is 05:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy