| |

VerySource

 Forgot password?
 Register
Search
View: 1662|Reply: 4

Ask you questions about ELF format files

[Copy link]

2

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-7 23:00:01
| Show all posts |Read mode
Which files under UNIX are expressed in ELF format. If I write a program to generate .obj files, .so files, .a files, and a.out, are these files all in ELF format? Is there any related software that can see files in ELF format?
Reply

Use magic Report

0

Threads

13

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-1-17 21:18:02
| Show all posts
None of the ones you mentioned seem to be ELF file formats. The so-called ELF file format is an executable file format under Linux, and the a.out format is an older UNIX executable file format.

ELF format files can be viewed with the elfdump command.
Reply

Use magic Report

1

Threads

11

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-1-17 22:27:02
| Show all posts
a.out is indeed an older format, different from the ELF format.
Now the file name of the executable file generated by gcc without using the -o parameter is "a.out", but this is just a name, it is actually an ELF format file.
Use the command file filemame to see the format of the file:
hyg @ ubuntu610: ~ / test / moduleTest $ file a.out
a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU / Linux 2.6.0, dynamically linked (uses shared libs), for GNU / Linux 2.6.0, not stripped
Reply

Use magic Report

2

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-2-10 16:45:01
| Show all posts
May I ask which files are ELF format under UNIX? Is this file format relevant to the compiler? Is it an operating system consideration?
Reply

Use magic Report

1

Threads

11

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-4-24 17:45:01
| Show all posts
The files generated by the compiler are of course related to the compiler.
The operating system has to load this file, and of course it has to know its format.

As for which files are in ELF format, anyway the executable files I see under Linux are all in this format.
Otherwise, I dare not talk nonsense.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list