Re: [PATCH][TRIVIAL] Remove bogus "value 0x37ffffff truncated to0x37ffffff" warning.

From: Davide Libenzi
Date: Sun Jan 11 2004 - 19:54:09 EST


On Mon, 12 Jan 2004, Bart Samwel wrote:

> Davide Libenzi wrote:
> >>Now it seems to behave correctly: for '~' it always warns, for '-' it
> >>only warns if the negative value is below -0x80000000. I'll submit a
> >>patch to this effect (including the format extensions) to the binutils
> >>people.
> >
> > binutils 2.14 works fine, so I believe they already fixed it.
>
> Against your code, yes. I'm using binutils 2.14 as well. Check it when
> declaring a .long, like the kernel code does. Then it warns.

Nope. It does not. Tested on three versions of binutils:

[davide@bigblue davide]$ as << EOF
> PG=0xC0000000
> VM=(128 << 20)
> .long (-PG - VM) - 1
> .long (~PG + 1 - VM) - 1
> EOF
[davide@bigblue davide]$ objdump -D a.out

a.out: file format elf32-i386

Disassembly of section .text:

00000000 <.text>:
0: ff (bad)
1: ff (bad)
2: ff 37 pushl (%edi)
4: ff (bad)
5: ff (bad)
6: ff 37 pushl (%edi)
Disassembly of section .data:


Also, most important, the `make bzImage` does not give any warnings.



- Davide


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/