Why does objdump behave differently on macOS and Linux?

Jose E. Marchesi jemarch@gnu.org
Tue Apr 27 22:55:46 GMT 2021


> $ /usr/local/opt/binutils/bin/objdump -v
> GNU objdump (GNU Binutils) 2.36.1
> Copyright (C) 2021 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License version 3 or (at your option) any later version.
> This program has absolutely no warranty.
> $ objdump -v
> GNU objdump (GNU Binutils for Debian) 2.35.2
> Copyright (C) 2020 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License version 3 or (at your option) any later version.
> This program has absolutely no warranty.
>
> I have the installation of objdump on macOS and Linux. But the results
> are not the same. On macOS, the result shows "ret". But on Linux, the
> result shows "retq". Why is it so? Thanks.
>
> $ echo ret > 1.asm
> $ nasm -felf64 1.asm
> $ /usr/local/opt/binutils/bin/objdump -w -d 1.o
>    0:	c3                   	ret
>
> $ echo ret > 1.asm
> $ nasm -felf64 1.asm
> $ objdump -w -d 1.o
>    0:	c3                   	retq

Different versions of binutils?


More information about the Binutils mailing list