{
va_list args;
+ /* Try to keep error messages in sync with the program's normal output. */
+ fflush (stdout);
+
va_start (args, message);
fprintf (stderr, _("%s: Error: "), program_name);
vfprintf (stderr, message, args);
{
va_list args;
+ /* Try to keep warning messages in sync with the program's normal output. */
+ fflush (stdout);
+
va_start (args, message);
fprintf (stderr, _("%s: Warning: "), program_name);
vfprintf (stderr, message, args);
| (((unsigned long) (field[2])) << 16)
| (((unsigned long) (field[3])) << 24);
+ case 5:
+ if (sizeof (elf_vma) == 8)
+ return ((elf_vma) (field[0]))
+ | (((elf_vma) (field[1])) << 8)
+ | (((elf_vma) (field[2])) << 16)
+ | (((elf_vma) (field[3])) << 24)
+ | (((elf_vma) (field[4])) << 32);
+ else if (sizeof (elf_vma) == 4)
+ /* We want to extract data from an 8 byte wide field and
+ place it into a 4 byte wide field. Since this is a little
+ endian source we can just use the 4 byte extraction code. */
+ return ((unsigned long) (field[0]))
+ | (((unsigned long) (field[1])) << 8)
+ | (((unsigned long) (field[2])) << 16)
+ | (((unsigned long) (field[3])) << 24);
+
+ case 6:
+ if (sizeof (elf_vma) == 8)
+ return ((elf_vma) (field[0]))
+ | (((elf_vma) (field[1])) << 8)
+ | (((elf_vma) (field[2])) << 16)
+ | (((elf_vma) (field[3])) << 24)
+ | (((elf_vma) (field[4])) << 32)
+ | (((elf_vma) (field[5])) << 40);
+ else if (sizeof (elf_vma) == 4)
+ /* We want to extract data from an 8 byte wide field and
+ place it into a 4 byte wide field. Since this is a little
+ endian source we can just use the 4 byte extraction code. */
+ return ((unsigned long) (field[0]))
+ | (((unsigned long) (field[1])) << 8)
+ | (((unsigned long) (field[2])) << 16)
+ | (((unsigned long) (field[3])) << 24);
+
+ case 7:
+ if (sizeof (elf_vma) == 8)
+ return ((elf_vma) (field[0]))
+ | (((elf_vma) (field[1])) << 8)
+ | (((elf_vma) (field[2])) << 16)
+ | (((elf_vma) (field[3])) << 24)
+ | (((elf_vma) (field[4])) << 32)
+ | (((elf_vma) (field[5])) << 40)
+ | (((elf_vma) (field[6])) << 48);
+ else if (sizeof (elf_vma) == 4)
+ /* We want to extract data from an 8 byte wide field and
+ place it into a 4 byte wide field. Since this is a little
+ endian source we can just use the 4 byte extraction code. */
+ return ((unsigned long) (field[0]))
+ | (((unsigned long) (field[1])) << 8)
+ | (((unsigned long) (field[2])) << 16)
+ | (((unsigned long) (field[3])) << 24);
+
case 8:
if (sizeof (elf_vma) == 8)
return ((elf_vma) (field[0]))
| (((unsigned long) (field[1])) << 16)
| (((unsigned long) (field[0])) << 24);
+ case 5:
+ if (sizeof (elf_vma) == 8)
+ return ((elf_vma) (field[4]))
+ | (((elf_vma) (field[3])) << 8)
+ | (((elf_vma) (field[2])) << 16)
+ | (((elf_vma) (field[1])) << 24)
+ | (((elf_vma) (field[0])) << 32);
+ else if (sizeof (elf_vma) == 4)
+ {
+ /* Although we are extracting data from an 8 byte wide field,
+ we are returning only 4 bytes of data. */
+ field += 1;
+ return ((unsigned long) (field[3]))
+ | (((unsigned long) (field[2])) << 8)
+ | (((unsigned long) (field[1])) << 16)
+ | (((unsigned long) (field[0])) << 24);
+ }
+
+ case 6:
+ if (sizeof (elf_vma) == 8)
+ return ((elf_vma) (field[5]))
+ | (((elf_vma) (field[4])) << 8)
+ | (((elf_vma) (field[3])) << 16)
+ | (((elf_vma) (field[2])) << 24)
+ | (((elf_vma) (field[1])) << 32)
+ | (((elf_vma) (field[0])) << 40);
+ else if (sizeof (elf_vma) == 4)
+ {
+ /* Although we are extracting data from an 8 byte wide field,
+ we are returning only 4 bytes of data. */
+ field += 2;
+ return ((unsigned long) (field[3]))
+ | (((unsigned long) (field[2])) << 8)
+ | (((unsigned long) (field[1])) << 16)
+ | (((unsigned long) (field[0])) << 24);
+ }
+
+ case 7:
+ if (sizeof (elf_vma) == 8)
+ return ((elf_vma) (field[6]))
+ | (((elf_vma) (field[5])) << 8)
+ | (((elf_vma) (field[4])) << 16)
+ | (((elf_vma) (field[3])) << 24)
+ | (((elf_vma) (field[2])) << 32)
+ | (((elf_vma) (field[1])) << 40)
+ | (((elf_vma) (field[0])) << 48);
+ else if (sizeof (elf_vma) == 4)
+ {
+ /* Although we are extracting data from an 8 byte wide field,
+ we are returning only 4 bytes of data. */
+ field += 3;
+ return ((unsigned long) (field[3]))
+ | (((unsigned long) (field[2])) << 8)
+ | (((unsigned long) (field[1])) << 16)
+ | (((unsigned long) (field[0])) << 24);
+ }
+
case 8:
if (sizeof (elf_vma) == 8)
return ((elf_vma) (field[7]))
| (((elf_vma) (field[0])) << 56);
else if (sizeof (elf_vma) == 4)
{
- /* Although we are extracing data from an 8 byte wide field,
+ /* Although we are extracting data from an 8 byte wide field,
we are returning only 4 bytes of data. */
field += 4;
return ((unsigned long) (field[3]))
return (x ^ 0x80) - 0x80;
case 2:
return (x ^ 0x8000) - 0x8000;
+ case 3:
+ return (x ^ 0x800000) - 0x800000;
case 4:
return (x ^ 0x80000000) - 0x80000000;
+ case 5:
+ case 6:
+ case 7:
case 8:
+ /* Reads of 5-, 6-, and 7-byte numbers are the result of
+ trying to read past the end of a buffer, and will therefore
+ not have meaningful values, so we don't try to deal with
+ the sign in these cases. */
return x;
default:
abort ();