public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* Endian bug in check-textrel
@ 2002-12-21 13:32 Andreas Schwab
  2002-12-21 13:40 ` Ulrich Drepper
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2002-12-21 13:32 UTC (permalink / raw)
  To: libc-hacker

p_type is a word, thus must be swapped.

Andreas.

2002-12-21  Andreas Schwab  <schwab@suse.de>

	* elf/check-textrel.c (handle_file): Swap p_type.

--- elf/check-textrel.c.~1.3.~	2002-12-14 00:17:43.000000000 +0100
+++ elf/check-textrel.c	2002-12-21 22:23:28.000000000 +0100
@@ -78,7 +78,7 @@ AB(handle_file) (const char *fname, int 
   /* Search for the PT_DYNAMIC entry.  */
   size_t cnt;
   for (cnt = 0; cnt < phnum; ++cnt)
-    if (phdr[cnt].p_type == PT_DYNAMIC)
+    if (SWAP (phdr[cnt].p_type) == PT_DYNAMIC)
       break;
 
   if (cnt == phnum)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Endian bug in check-textrel
  2002-12-21 13:32 Endian bug in check-textrel Andreas Schwab
@ 2002-12-21 13:40 ` Ulrich Drepper
  2002-12-22 11:45   ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Drepper @ 2002-12-21 13:40 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libc-hacker

Andreas Schwab wrote:
> p_type is a word, thus must be swapped.

Thanks, I've applied the patch.

Do you build m68k on an x86 box?

-- 
--------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Endian bug in check-textrel
  2002-12-21 13:40 ` Ulrich Drepper
@ 2002-12-22 11:45   ` Andreas Schwab
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2002-12-22 11:45 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: libc-hacker

Ulrich Drepper <drepper@redhat.com> writes:

> Andreas Schwab wrote:
> > p_type is a word, thus must be swapped.
> 
> Thanks, I've applied the patch.
> 
> Do you build m68k on an x86 box?

No, on ppc and ia64.

Andreas.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-12-22 19:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-21 13:32 Endian bug in check-textrel Andreas Schwab
2002-12-21 13:40 ` Ulrich Drepper
2002-12-22 11:45   ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).