determining the object files...


 
Thread Tools Search this Thread
Top Forums Programming determining the object files...
# 1  
Old 08-05-2008
determining the object files...

hello,
is there a utility to determine which object files are used to create a binary executable file?let me explain, please:
for ex. there are three files:
a.o b.o c.o
and these files are used to create a binary called:
prg
namely, a.o b.o c.o -> prg
so, how can i determine these three object files by investigating the binary file,prg ?
# 2  
Old 08-06-2008
IF the files use distinctive names for functions and the executable (prg) is not stripped
then try nm.
Code:
nm prg > prg.dat
for file in *.o
do
   nm $file > $file.dat
done

Then you have to read thru the .dat files - this is not guranteed to work by any means.
Do you not have source code?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

How to initialize an object with another object of different class?

How to initialize an object of class say "A", with an object of type say "B". The following code give the error message "error: conversion from âAâ to non-scalar type âBâ requested" #include <iostream> using namespace std; class B; class A{ public: A() { cout <<"\nA()" << endl; } ... (1 Reply)
Discussion started by: techmonk
1 Replies

2. UNIX for Dummies Questions & Answers

Determining file size for a list of files with paths

Hello, I have a flat file with a list of files with the path to the file and I am attempting to calculate the filesize for each one; however xargs isn't playing nicely and I am sure there is probably a better way of doing this. What I envisioned is this: cat filename|xargs -i ls -l {} |awk... (4 Replies)
Discussion started by: joe8mofo
4 Replies

3. Programming

determining the IP of a function

Is there a way to determine the "Instruction Pointer" of a function in c++, and if so can someone tell me? (5 Replies)
Discussion started by: neur0n
5 Replies

4. UNIX for Dummies Questions & Answers

How to obtain list of object files in a shared (dynamic) library?

How can I simply obtain a list of the object files in a shared (dynamic) library. I am looking for the equivalent of "ar -t <lib>" for archived (static) libraries. Thanks in advance. :rolleyes: ---------- Post updated at 01:47 PM ---------- Previous update was at 12:16 PM ---------- The... (1 Reply)
Discussion started by: chatieremerrill
1 Replies

5. UNIX for Dummies Questions & Answers

Object reference not set to an instance of an object

I am new to PHP and UNIX. I am using Apache to do my testing on a Windows Vista machine. I am getting this error when I am trying to connect to a web service. I did a search and did not see any posts that pertain to this. Here is my function: <?php function TRECSend($a, $b, $c, $d,... (0 Replies)
Discussion started by: EddiRae
0 Replies

6. Shell Programming and Scripting

Determining number of overlaps between two files using Hashes?

Hi there, I have a doubt about how to set this up. This is the situation. I have two files, one that is ~31,000 in length and has the following information (7 fields): file1 1 + 100208127 100261594 6 100208127,100231680,100237404,100245177,100249508,100260529, ... (35 Replies)
Discussion started by: labrazil
35 Replies

7. AIX

Can I link object files compiled with xlC and g++?

Hello, Is it possible to link object files compiled with different compilers on AIX, say xlC and g++? Thanks Ping (0 Replies)
Discussion started by: luop0812
0 Replies

8. Solaris

Determining processes that have been swapped out

Is there a way to do this in Solaris? For instance, suppose I run the following: $ swap -l swapfile dev swaplo blocks free /dev/md/dsk/d501 85,501 16 16780208 16780208 $ swap -s total: 3377368k bytes allocated + 519416k reserved = 3896784k used, 11011992k available... (1 Reply)
Discussion started by: lyonsd
1 Replies

9. Programming

creating object files in a specific directory

hello, i have a makefile in which i am specifying the option for creating the object files of the source files. The option which i am using is this : gcc -c main.c first.c by default these object files are created in the same directory in which the makefile is present. what option... (1 Reply)
Discussion started by: svh
1 Replies

10. UNIX for Advanced & Expert Users

object files ?? Files within Files??

:D can you? and if you can... how do you create oject files.. Files within Files...!!? if this is not possible no answer required..! thanx moxxx68 ps.. excuse my logic if this is under the wrong topic.....:) (1 Reply)
Discussion started by: moxxx68
1 Replies
Login or Register to Ask a Question