Announcement

Collapse
No announcement yet.

Linux Preparing To Finally Remove Support For The a.out Format

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • shopt
    replied
    Originally posted by shmerl View Post

    Makes sense to rename it then for clarity.
    Disagree. Renaming would break scripts, and for what? Most people don't care what the binary format is, nor have even heard of a.out as a binary format. If they do care, cursory inspection of it will show it to be ELF (this was true even when I did my comp sci degree ~15 years ago). Documentation will confirm. If you do care, you should have been specifying the binary format in your build scripts.

    Leave a comment:


  • shmerl
    replied
    Originally posted by KesZerda View Post

    Exactly the same. The default compiler output is named a.out, but it's been an elf binary for decades now.
    Makes sense to rename it then for clarity.

    Leave a comment:


  • shmerl
    replied
    Originally posted by Michael View Post

    Some compilers still use a.out naming when not specified without actually being a.out format.
    They can always switch to a.elf

    Leave a comment:


  • KesZerda
    replied
    Originally posted by shmerl View Post
    How will gcc output look without specifying the linked binary?
    Exactly the same. The default compiler output is named a.out, but it's been an elf binary for decades now.

    Leave a comment:


  • KesZerda
    replied
    Originally posted by caligula View Post
    I guess this is different, but many C tutorials introduce the concept of 'a.out' executable to save some typing when compiling stuff:

    $ echo "#include..." > hello.c
    $ gcc hello.c
    $ ./a.out

    Imagine the horror if you had to write this instead:

    $ gcc hello.c -o hello
    $ ./hello

    Requires 9 characters more.
    It is different, yes, and nothing will change in this move for 99.9% of people. Compilers have defaulted to creating an ELF executable for some time, even while keeping a.out as the default file name. a.out, even when the resulting binary is ELF, remains the default name because a lot of scripts would break if the default binary artifact ever changed its name.

    Leave a comment:


  • rmnscnce
    replied
    Originally posted by caligula View Post
    I guess this is different, but many C tutorials introduce the concept of 'a.out' executable to save some typing when compiling stuff:

    $ echo "#include..." > hello.c
    $ gcc hello.c
    $ ./a.out

    Imagine the horror if you had to write this instead:

    $ gcc hello.c -o hello
    $ ./hello

    Requires 9 characters more.
    This will make some people unhappy and some scripts to break, but I wish the C compilers by default now take the route of naming the executable binary generated whatever name the file containing main() (or whatever the entry point is -- I don't make the rules) is, and get rid of the filename extension ("main.c" compiles to "main")

    Leave a comment:


  • Michael
    replied
    Originally posted by caligula View Post
    I guess this is different, but many C tutorials introduce the concept of 'a.out' executable to save some typing when compiling stuff:

    $ echo "#include..." > hello.c
    $ gcc hello.c
    $ ./a.out

    Imagine the horror if you had to write this instead:

    $ gcc hello.c -o hello
    $ ./hello

    Requires 9 characters more.
    Some compilers still use a.out naming when not specified without actually being a.out format.

    Leave a comment:


  • bug77
    replied
    Wth, the first program I wrote in C for Linux produced an a.out. You're telling me that won't work anymore? One can't write a first program, you know? Not to mention I barely remember a shred of C these days.

    Farewell a.out, it's been nice knowing you.

    Leave a comment:


  • shmerl
    replied
    How will gcc output look without specifying the linked binary?

    Leave a comment:


  • caligula
    replied
    I guess this is different, but many C tutorials introduce the concept of 'a.out' executable to save some typing when compiling stuff:

    $ echo "#include..." > hello.c
    $ gcc hello.c
    $ ./a.out

    Imagine the horror if you had to write this instead:

    $ gcc hello.c -o hello
    $ ./hello

    Requires 9 characters more.

    Leave a comment:

Working...
X