Răsfoiți Sursa

x86, vdso: Remove one final use of htole16()

One final use of the macros from <endian.h> which are not available on
older system.  In this case we had one sole case of *writing* a
littleendian number, but the number is SHN_UNDEF which is the constant
zero, so rather than dealing with the general case of littleendian
puts here, just document that the constant is zero and be done with
it.

Reported-and-Tested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Link: http://lkml.kernel.org/r/20140610135051.c3c34165f73d67d218b62bd9@linux-foundation.org
H. Peter Anvin 11 ani în urmă
părinte
comite
4d048b0255
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      arch/x86/vdso/vdso2c.h

+ 1 - 1
arch/x86/vdso/vdso2c.h

@@ -116,7 +116,7 @@ static void GOFUNC(void *addr, size_t len, FILE *outfile, const char *name)
 	hdr->e_shoff = 0;
 	hdr->e_shoff = 0;
 	hdr->e_shentsize = 0;
 	hdr->e_shentsize = 0;
 	hdr->e_shnum = 0;
 	hdr->e_shnum = 0;
-	hdr->e_shstrndx = htole16(SHN_UNDEF);
+	hdr->e_shstrndx = SHN_UNDEF; /* SHN_UNDEF == 0 */
 
 
 	if (!name) {
 	if (!name) {
 		fwrite(addr, load_size, 1, outfile);
 		fwrite(addr, load_size, 1, outfile);