This is the mail archive of the
mailing list for the binutils project.
Re: Should rename ELFOSABI_LINUX into ELFOSABI_GNU, and drop ELFOSABI_HURD
> 2011-07-04 Thomas Schwinge <firstname.lastname@example.org>
> * osabi.c (generic_elf_osabi_sniffer) <ELFOSABI_GNU>: Handle in the
> same way as ELFOSABI_NONE.
> <ELFOSABI_LINUX, ELFOSABI_HURD>: Remove cases.
Thanks for doing this. The patch looks good to me overall. Just one
> diff --git a/gdb/osabi.c b/gdb/osabi.c
> index a264924..7820ecb 100644
> --- a/gdb/osabi.c
> +++ b/gdb/osabi.c
> @@ -519,6 +519,11 @@ generic_elf_osabi_sniffer (bfd *abfd)
> the base specification for that machine (there are no
> OS-specific extensions). In order to determine the real OS
> in use we must look for OS-specific notes. */
> + /* Fall through. */
> + case ELFOSABI_GNU:
> + /* The same applies for ELFOSABI_GNU: this can mean GNU/Hurd, GNU/Linux,
> + and possibly more. */
I'm not sure I like the fall through. In fact, it's not a real fall
through. What we could do is have:
/* When the EI_OSABI field in the ELF header is ELFOSABI_NONE
The same applies for ELFOSABI_GNU: this can mean GNU/Hurd,
GNU/Linux, and possibly more. */
Also, we're trying to keep our lines of code, including comments to
70 characters (it's a soft limit). If you can fit something in under
80 charas but not un 70, and it looks better on one line, do it. But
otherwise, try to stay withing the 70 chars limit.
Pre-approved with those changes.