[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-06 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 --- Comment #14 from H.J. Lu --- Another R_X86_64_32S overflow check testcase: [hjl@gnu-tools-1 pr19567]$ cat x.S #ifndef SPACE #define SPACE 0x8000 #endif .data .space SPACE .comm foo,4 .text .glob

[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-06 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 --- Comment #13 from H.J. Lu --- Another testcase: [hjl@gnu-tools-1 pr18695]$ cat bar.c #include extern int *get_foo (void); int main () { int *p = get_foo (); printf ("foo: %d\n", *p); *p = 1; printf ("foo: %d\n", *p); return 0;

[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-06 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 --- Comment #12 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Cary Coutant : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=19ef3f4d2eaac10e98c7ba3f9eace8609ab5278e commit 19ef3f4d2eaac10e98c7ba3f9e

[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-06 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 --- Comment #11 from H.J. Lu --- Here is a testcase: [hjl@gnu-tools-1 pr18695]$ cat foo.S .data .space 0x8000 .comm foo,4 [hjl@gnu-tools-1 pr18695]$ cat main.c #include extern int foo; int main () { printf (

[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-05 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 --- Comment #10 from H.J. Lu --- (In reply to Cary Coutant from comment #9) > > My test here doesn't follow any programming model and is independent of > > x32 or x86-64: > > > > [hjl@gnu-6 pr19567]$ cat x.s > > .globl _start > > _start:

[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-05 Thread ccoutant at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 --- Comment #9 from Cary Coutant --- > My test here doesn't follow any programming model and is independent of > x32 or x86-64: > > [hjl@gnu-6 pr19567]$ cat x.s > .globl _start > _start: > mov $_start,%rax > mov _start,%rax > [hjl

[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-05 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 --- Comment #8 from H.J. Lu --- (In reply to Cary Coutant from comment #7) > > [hjl@gnu-6 pr19567]$ cat x.s > > .globl _start > > _start: > > mov $_start,%rax > > mov _start,%rax > > [hjl@gnu-6 pr19567]$ make > > as --x32 -o x.o x

[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-04 Thread ccoutant at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 --- Comment #7 from Cary Coutant --- > [hjl@gnu-6 pr19567]$ cat x.s > .globl _start > _start: > mov $_start,%rax > mov _start,%rax > [hjl@gnu-6 pr19567]$ make > as --x32 -o x.o x.s > ld.gold -m elf32_x86_64 -Ttext-segment 0x80

[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-04 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 --- Comment #6 from H.J. Lu --- To access address x8054, we do [hjl@gnu-6 pr19567]$ cat z.s .globl _start _start: movabs $_start,%rax movabs _start,%rax [hjl@gnu-6 pr19567]$ make LD=ld z as --x32 -o z.o z.s ld -m elf32_x86_64

[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-04 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 --- Comment #5 from H.J. Lu --- [hjl@gnu-6 pr19567]$ cat x.s .globl _start _start: mov $_start,%rax mov _start,%rax [hjl@gnu-6 pr19567]$ make as --x32 -o x.o x.s ld.gold -m elf32_x86_64 -Ttext-segment 0x8000 -o x x.o objdump -

[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-04 Thread ccoutant at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 --- Comment #4 from Cary Coutant --- > I can't tell 0x returned from Symbol_value::value is -1 or > 4294967295. Both are possible for x32 since hardware address is 64-bit. But they're the same bit pattern. Whether it's -1 or 42949672

[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-04 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 --- Comment #3 from H.J. Lu --- For x32, I need Symbol_value::value to return 64-bit value even though x32 is ELF32. -- You are receiving this mail because: You are on the CC list for the bug. ___

[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-04 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 --- Comment #2 from H.J. Lu --- (In reply to Cary Coutant from comment #1) > Sorry, if there's a bug here that you're trying to describe, I don't see it. > > Yes, I agree that the addend in Symbol_value::value() and > Merged_symbol_value::val

[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-04 Thread ccoutant at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 --- Comment #1 from Cary Coutant --- Sorry, if there's a bug here that you're trying to describe, I don't see it. Yes, I agree that the addend in Symbol_value::value() and Merged_symbol_value::value() should be signed -- it really should be a

[Bug gold/19567] Symbol_value::value doesn't support x32 overflow check

2016-02-04 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19567 H.J. Lu changed: What|Removed |Added Depends on||6658 Referenced Bugs: https://sourceware.