Message ID | 871uy5hsol.fsf@kepler.schwinge.homeip.net |
---|---|
State | New |
Headers | show |
Thomas Schwinge <thomas@schwinge.name> writes: > The only ELFOSABI_* occurrences in GCC trunk are in libgo. > > Ian, what do you think about the following patch (untested -- what > testing does this need)? Is it even worth keeping the ELFOSABI_LINUX > alias? (It can never be returned via osabiStrings.) These files are simply copied directly from the master Go library, so the change should be made there. See libgo/README and http://golang.org/doc/contribute.html. I can probably take care of it at some point if you don't want to bother. Ian
Hallo! On Tue, 05 Jul 2011 12:19:31 -0700, Ian Lance Taylor <iant@google.com> wrote: > Thomas Schwinge <thomas@schwinge.name> writes: > > > The only ELFOSABI_* occurrences in GCC trunk are in libgo. > > > > Ian, what do you think about the following patch (untested -- what > > testing does this need)? Is it even worth keeping the ELFOSABI_LINUX > > alias? (It can never be returned via osabiStrings.) > > These files are simply copied directly from the master Go library, so > the change should be made there. See libgo/README and > http://golang.org/doc/contribute.html. > > I can probably take care of it at some point if you don't want to > bother. It would be great if you could do that. I already did file the individual contributor license agreement, but I think learning the whole code review process for this small change is a bit too much for the moment. Grüße, Thomas
diff --git a/libgo/go/debug/elf/elf.go b/libgo/go/debug/elf/elf.go index 5d45b24..0c313e5 100644 --- a/libgo/go/debug/elf/elf.go +++ b/libgo/go/debug/elf/elf.go @@ -119,8 +119,8 @@ const ( ELFOSABI_NONE OSABI = 0 /* UNIX System V ABI */ ELFOSABI_HPUX OSABI = 1 /* HP-UX operating system */ ELFOSABI_NETBSD OSABI = 2 /* NetBSD */ - ELFOSABI_LINUX OSABI = 3 /* GNU/Linux */ - ELFOSABI_HURD OSABI = 4 /* GNU/Hurd */ + ELFOSABI_GNU OSABI = 3 /* GNU */ + ELFOSABI_LINUX OSABI = 3 /* GNU/Linux; alias for ELFOSABI_GNU */ ELFOSABI_86OPEN OSABI = 5 /* 86Open common IA32 ABI */ ELFOSABI_SOLARIS OSABI = 6 /* Solaris */ ELFOSABI_AIX OSABI = 7 /* AIX */ @@ -139,8 +139,7 @@ var osabiStrings = []intName{ {0, "ELFOSABI_NONE"}, {1, "ELFOSABI_HPUX"}, {2, "ELFOSABI_NETBSD"}, - {3, "ELFOSABI_LINUX"}, - {4, "ELFOSABI_HURD"}, + {3, "ELFOSABI_GNU"}, {5, "ELFOSABI_86OPEN"}, {6, "ELFOSABI_SOLARIS"}, {7, "ELFOSABI_AIX"}, diff --git a/libgo/go/debug/elf/elf_test.go b/libgo/go/debug/elf/elf_test.go index 67b961b..118e20a 100644 --- a/libgo/go/debug/elf/elf_test.go +++ b/libgo/go/debug/elf/elf_test.go @@ -15,7 +15,7 @@ type nameTest struct { } var nameTests = []nameTest{ - {ELFOSABI_LINUX, "ELFOSABI_LINUX"}, + {ELFOSABI_GNU, "ELFOSABI_GNU"}, {ET_EXEC, "ET_EXEC"}, {EM_860, "EM_860"}, {SHN_LOPROC, "SHN_LOPROC"},