Sponsored Content
Full Discussion: binary conversion
Operating Systems Solaris binary conversion Post 302554330 by Corona688 on Sunday 11th of September 2011 01:51:14 PM
Old 09-11-2011
Quote:
Originally Posted by steve701
I said "TARGET" machine is a sparc !!! Source machine is x86. Please read the statement carefully.
Quote:
ELF 32-bit LSB executable 80386 Version 1, dynamically linked, not stripped, no debugging information available

The only difference is that it is built on an x86 machine as can be seen above and the target machine which it fails to run in is a SPARC, why should that make a difference, if there are NO system calls? (OS is same!!)
Your statement is pretty unambigious. You didn't ask why it built a 386 executable for a SPARC target -- you asked why the 386 executable wouldn't run on a SPARC target. That's why.
 

10 More Discussions You Might Find Interesting

1. Programming

Binary to text format conversion

Hi, Please can any one tell me how to convert binary data to text format and vice versa. If possible give me the algorithm or C program. Thanks in advance Waiting for reply Bye:o (5 Replies)
Discussion started by: manjunath
5 Replies

2. Shell Programming and Scripting

shell script conversion to binary

My question is: i have a script called getevent to run i just call ./getevent can i convert this to make it binary executable and not letting my clients open it and see the code.??:( I am using Solaris 8. (3 Replies)
Discussion started by: bcheaib
3 Replies

3. UNIX for Dummies Questions & Answers

Binary file conversion

All, I want to convert multiple \0 005 characters to line feed 012 character in a binary file to make to readable. Here is the sample od -c file output: 0000000 254 355 \0 005 s r \0 * c o m . c i s c Here is the sample od -b file output: 0000000 254 355 000... (0 Replies)
Discussion started by: bubba112557
0 Replies

4. SCO

ascii to binary conversion in sco 5.0.5

Here is what I did . . . . I FTP'd several *.dbf zipped files from a SCO 5.0.5 server to winXP machine, and did not set the transfer mode to BIN, now when i was uncompressing these files in SCO 5.0.5 , it was giving "Bad Decode Table error. Is there a way to convert the *.dbf.Z files to Binary so... (1 Reply)
Discussion started by: sameek1211
1 Replies

5. Programming

Binary conversion function

Is/are there any function(s) in C that convert(s) character/ASCII/Decimal to binary and vice versa? what about bcopy and strcpy? (1 Reply)
Discussion started by: Peevish
1 Replies

6. Shell Programming and Scripting

binary file conversion

Hello folks, i have a binary text file but i am not able to convert into text format, please suggest. thanks. (2 Replies)
Discussion started by: learnbash
2 Replies

7. Shell Programming and Scripting

binary to ascii conversion

Hi, I have got a library file, created by compiling C code. The file information with "file" command, gives it a "application/x-archive" type file. I want to extract the release string of my software from this file, so that i can know which version of C files were used to create the lib. Can... (3 Replies)
Discussion started by: atulmt
3 Replies

8. Shell Programming and Scripting

Hexadecimal to Binary conversion

Hi Guys, Is it possible to convert the hexadecimal to Binary by unix command.....I could not figure out.... If I need to convert AF6D to binary...what could be the way to do? Thanks in advance!! ---------- Post updated at 02:57 AM ---------- Previous update was at 02:42 AM ---------- I... (6 Replies)
Discussion started by: Indra2011
6 Replies

9. Shell Programming and Scripting

Conversion from Hexadecimal to binary

How can I convert hexadecimal values to Binary from the second field to the end Input: WS-2 23 345 235 DT-3 45 4A3 000 pp-2 76 300 E4 Output: WS-2 100011 1101000101 1000110101 DT-3 1000101 10010100011 000 pp-2 1110110 1100000000 11100100 (16 Replies)
Discussion started by: aydj
16 Replies

10. UNIX for Beginners Questions & Answers

Conversion of Binary csv file

Hello, I have a binary csv file that was created on 'Red Hat Enterprise Linux Server release 6.6'. Now we have transferred all files on Ubuntu 16.04.2 LTS/xenial On opening the file in Ubuntu, there are special characters ... (8 Replies)
Discussion started by: nans
8 Replies
elfwrap(1)							   User Commands							elfwrap(1)

NAME
elfwrap - wrap data in an ELF file SYNOPSIS
elfwrap [-64] [-o relobj-file] [-z target=sparc | x86] data-file... DESCRIPTION
The elfwrap utility creates an ELF relocatable object file from one or more data files. The relocatable object encapsulates each data file within an individual section, together with symbols that can be used to reference the section. The relocatable object is appropriate for inclusion with a subsequent link-edit. Users can reference the encapsulated data using the associated symbols. By default, a 32-bit ELF relocatable object is created that is appropriate for the machine on which elfwrap is executed. The -64 option can be used to create a 64-bit ELF relocatable object. The -z target option can be used to create a relocatable object for a specific machine type. Note - Any data encapsulated with elfwrap must be in a format appropriate for the destination target. By default, the relocatable object a.wrap.o is created. The -o option can be used to specify an alternative relocatable object name. The basename(1) of each data file is used to create various pieces of ELF information. For example, if the input data file is ISV/isv- data, the following ELF information is created within the relocatable object. An ELF section named .isv-data This section contains the entire contents of the input data file. An ELF symbol named isv-data_start This symbol reflects the starting address of the .isv-data section. An ELF symbol named isv-data_end This symbol reflects the address of the first location after the .isv-data section. OPTIONS
The following options are supported: -64 Create a 64-bit ELF relocatable object. -o relobj-file Produce a relocatable object that is named relobj-file. -z target=sparc | x86 Specifies the machine type for the output relocatable object. Supported targets are sparc and x86. The 32-bit machine type for the specified target is used unless the -64 option is also present, in which case the corresponding 64-bit machine type is used. By default, the relocatable object that is generated is 32-bit for the machine one which elfwrap is executed. EXAMPLES
The following example encapsulates the system passwd file and the system group file within a relocatable object passgroup.o. example% elfwrap -o passgroup.o /etc/passwd /etc/group example% elfdump -s passgroup.o | egrep "passwd|group" [2] 0x00000000 0x00000000 SECT LOCL D 0 .passwd [3] 0x00000000 0x00000000 SECT LOCL D 0 .group [7] 0x00000000 0x000002f0 OBJT GLOB D 0 .passwd passwd_start [8] 0x000002f0 0x00000000 OBJT GLOB D 0 .passwd passwd_end [9] 0x00000000 0x00000121 OBJT GLOB D 0 .group group_start [10] 0x00000121 0x00000000 OBJT GLOB D 0 .group group_end example% strings -N.passwd passgroup.o | head -1 root:x:0:0:Super-User:/:/sbin/sh example% strings -N.group passgroup.o | head -1 root::0: This relocatable object can be referenced from the following user code. example% cat main.c #include <stdio.h> extern char passwd_start, passwd_end; void main() { char *pstart = &passwd_start, *pend = &passwd_end; char *str, *lstr; for (lstr = str = pstart; str < pend; str++) { if ((*str == '0) && (str != (pend - 1))) { (void) printf("%.*s", (++str - lstr), lstr); lstr = str; } } } example% cc -o main main.c passgroup.o example% ./main root:x:0:0:Super-User:/:/sbin/sh .... nobody4:x:65534:65534:SunOS 4.x NFS Anonymous Access User:/: FILES
a.wrap.o The default relocatable object file created. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWtoo | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ SEE ALSO
elfdump(1), ld(1), strings(1), elf(3ELF), attributes(5), ddi_modopen(9F) Linker and Libraries Guide SunOS 5.11 17 March 2008 elfwrap(1)
All times are GMT -4. The time now is 04:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy