[Bug gas/32171] The assembler should report errors for illegal uses of egpr instructions.

2024-09-12 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32171

--- Comment #1 from H.J. Lu  ---
Is this the complete list?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gas/32171] The assembler should report errors for illegal uses of egpr instructions.

2024-09-12 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32171

--- Comment #3 from H.J. Lu  ---
We need to issue an error on these instructions.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug admin/31881] binutils-gdb Git repository is flooded by automatic commits

2024-09-14 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31881

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #27 from H.J. Lu  ---
The cron job should check if there are any BFD source changes before updating
bfd/version.h.  It is trivial to do withe shell script.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/13287] g++ -Wl,--as-needed -flto doesn't work with the BFD linker, but with gold

2011-10-17 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13287

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #2 from H.J. Lu  2011-10-17 15:41:05 
UTC ---
It is a regression.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13201] gcc -Wl,--as-needed -flto doesn't work with the BFD linker, but with gold

2011-10-17 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13201

H.J. Lu  changed:

   What|Removed |Added

 Blocks||13287

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13287] g++ -Wl,--as-needed -flto doesn't work with the BFD linker, but with gold

2011-10-17 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13287

H.J. Lu  changed:

   What|Removed |Added

 CC||amodra at gmail dot com
 Depends on||13201

--- Comment #3 from H.J. Lu  2011-10-17 15:56:01 
UTC ---
It is caused by

http://sourceware.org/ml/binutils/2011-09/msg00121.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13278] --plugin doesn't work on archive

2011-10-17 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13278

H.J. Lu  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #7 from H.J. Lu  2011-10-17 20:49:24 
UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13302] IRELATIVE relocation should come last

2011-10-17 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13302

H.J. Lu  changed:

   What|Removed |Added

 AssignedTo|unassigned at sourceware|hjl.tools at gmail dot com
   |dot org |

--- Comment #1 from H.J. Lu  2011-10-17 22:49:36 
UTC ---
Created attachment 6016
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6016
A patch

Please try this.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13302] IRELATIVE relocation should come last

2011-10-18 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13302

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13177] garbage collector retains zombie references to external libraries

2011-10-18 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13177

H.J. Lu  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #5 from H.J. Lu  2011-10-18 19:08:03 
UTC ---
Patch is reverted on 2.22 branch,

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13232] Regression: --gc-sections: local symbol `_dl_argv@@GLIBC_PRIVATE' in ld.so is referenced by DSO

2011-10-18 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13232

Bug 13232 depends on bug 13177, which changed state.

Bug 13177 Summary: garbage collector retains zombie references to external 
libraries
http://sourceware.org/bugzilla/show_bug.cgi?id=13177

   What|Old Value   |New Value

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13302] IRELATIVE relocation should come last

2011-10-20 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13302

H.J. Lu  changed:

   What|Removed |Added

   Attachment #6016|0   |1
is obsolete||

--- Comment #2 from H.J. Lu  2011-10-20 23:21:27 
UTC ---
Created attachment 6023
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6023
A patch

This patch can build glibc on ia32 and x86-64.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13302] IRELATIVE relocation should come last

2011-10-21 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13302

--- Comment #4 from H.J. Lu  2011-10-21 18:31:06 
UTC ---
Another problem:

[hjl@gnu-6 pr13302b]$ cat x.c
void alt2(void) { }

static void (*resolve (void)) (void)
{
  return alt2;
}

void fct(void) __attribute__ ((ifunc ("resolve")));
extern __typeof(fct) int_fct __attribute__ ((alias("fct")));

void (*g)(void)  = int_fct;
int
main ()
{
  g ();
  return 0;
}
[hjl@gnu-6 pr13302b]$ make
/usr/gcc-4.7.0-x32/bin/gcc -fpie   -c -o x.o x.c
/usr/gcc-4.7.0-x32/bin/gcc -pie -o x x.o
readelf -r --wide x

Relocation section '.rela.dyn' at offset 0x498 contains 10 entries:
Offset Info Type   Symbol's Value 
Symbol's Name + Addend
002008c8  0008 R_X86_64_RELATIVE   
   06a0
002008d0  0008 R_X86_64_RELATIVE   
   0670
00200ab0  0008 R_X86_64_RELATIVE   
   0790
00200ac0  0008 R_X86_64_RELATIVE   
   0700
00200ac8  0008 R_X86_64_RELATIVE   
   06df
00200b18  0008 R_X86_64_RELATIVE   
   00200b18
00200ab8  00050006 R_X86_64_GLOB_DAT  
__gmon_start__ + 0
00200ad0  000a0006 R_X86_64_GLOB_DAT  
_Jv_RegisterClasses + 0
00200ad8  000b0006 R_X86_64_GLOB_DAT  
__cxa_finalize + 0
00200b20  0025 R_X86_64_IRELATIVE  
   06d2

Relocation section '.rela.plt' at offset 0x588 contains 3 entries:
Offset Info Type   Symbol's Value 
Symbol's Name + Addend
00200af8  00040007 R_X86_64_JUMP_SLOT 
__libc_start_main + 0
00200b08  000b0007 R_X86_64_JUMP_SLOT 
__cxa_finalize + 0
00200b00  0025 R_X86_64_IRELATIVE  
   06d2
[hjl@gnu-6 pr13302b]$ 

We have R_X86_64_IRELATIVE in .rela.dyn.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13302] IRELATIVE relocation should come last

2011-10-21 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13302

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
Version|2.21|2.23 (HEAD)
 Resolution||FIXED

--- Comment #6 from H.J. Lu  2011-10-21 20:20:30 
UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12451] --build-id doesn't work

2011-12-13 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12451

H.J. Lu  changed:

   What|Removed |Added

Summary|--build-id regression   |--build-id doesn't work

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/13505] New: apply_relocation always use 64bit little endian relocation

2011-12-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13505

 Bug #: 13505
   Summary: apply_relocation always use 64bit little endian
relocation
   Product: binutils
   Version: 2.23 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
AssignedTo: i...@airs.com
ReportedBy: hjl.to...@gmail.com
CC: ccout...@google.com
Classification: Unclassified


There are

template
void
apply_relocation(const Relocate_info* relinfo,
Target_type* target,
typename elfcpp::Elf_types::Elf_Addr r_offset,
unsigned int r_type,
typename elfcpp::Elf_types::Elf_Swxword r_addend,
const Symbol* gsym,
unsigned char* view,
typename elfcpp::Elf_types::Elf_Addr address,
section_size_type view_size)
{
 // Construct the ELF relocation in a temporary buffer.
 const int reloc_size = elfcpp::Elf_sizes<64>::rela_size;
 unsigned char relbuf[reloc_size];
 elfcpp::Rela<64, false> rel(relbuf);
 elfcpp::Rela_write<64, false> orel(relbuf);
 orel.put_r_offset(r_offset);
 orel.put_r_info(elfcpp::elf_r_info<64>(0, r_type));
 orel.put_r_addend(r_addend);
...

in target-reloc.h.  It always uses Rela<64, false> even for 32bit or big
endian target.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/13505] apply_relocation always use 64bit little endian relocation

2011-12-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13505

H.J. Lu  changed:

   What|Removed |Added

URL||http://sourceware.org/ml/bi
   ||nutils/2011-12/msg00224.htm
   ||l

--- Comment #1 from H.J. Lu  2011-12-15 19:57:44 
UTC ---
A patch is posted at

http://sourceware.org/ml/binutils/2011-12/msg00224.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/13507] New: Gold assumes GOT entry size is the same as ELF class size

2011-12-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13507

 Bug #: 13507
   Summary: Gold assumes GOT entry size is the same as ELF class
size
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
AssignedTo: i...@airs.com
ReportedBy: hjl.to...@gmail.com
CC: ccout...@google.com
Classification: Unclassified


Gold assumes GOT entry size is the same as ELF class size.
But for x32, the got entry size and alignment are 64bit
even though x32 uses 32bit ELF class.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/13507] Gold assumes GOT entry size is the same as ELF class size

2011-12-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13507

H.J. Lu  changed:

   What|Removed |Added

URL||http://sourceware.org/ml/bi
   ||nutils/2011-12/msg00229.htm
   ||l

--- Comment #1 from H.J. Lu  2011-12-16 01:05:26 
UTC ---
A patch is posted at

http://sourceware.org/ml/binutils/2011-12/msg00229.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13471] out-of-range indexing error in elf_howto_table[ R_386_IRELATIVE]

2011-12-16 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13471

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #1 from H.J. Lu  2011-12-16 15:27:11 
UTC ---
Fixed by:

http://sourceware.org/ml/binutils/2011-04/msg00165.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13581] New: R_X86_64_PC32 against global symbol can't be used for PIC on x32

2012-01-10 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13581

 Bug #: 13581
   Summary: R_X86_64_PC32 against global symbol can't be used for
PIC on x32
   Product: binutils
   Version: 2.23 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sourceware.org
ReportedBy: hjl.to...@gmail.com
Classification: Unclassified


[hjl@gnu-6 gold-2]$ cat x.c
#include 

int bar;
extern void foo ();

int
main ()
{
  printf ("main: %d\n", bar);
  foo ();
  printf ("main: %d\n", bar);
  bar += 3;
  foo ();
  printf ("main: %d\n", bar);
  return 0;
}
[hjl@gnu-6 gold-2]$ cat y.c
#include 

extern int bar;

void
foo ()
{
  printf ("bar: %d\n", bar);
  bar += 2;
}
[hjl@gnu-6 gold-2]$ make
/usr/gcc-4.6.3-x32/bin/gcc  -mx32 -g  -c y.c
/usr/gcc-4.6.3-x32/bin/gcc  -shared  -mx32 -g  -o y.so y.o
/usr/gcc-4.6.3-x32/bin/gcc  -mx32 -g  -o x x.c y.so -Wl,-rpath,.
./x
main: 0
make: *** [all] Segmentation fault
[hjl@gnu-6 gold-2]$ gdb x
GNU gdb (GDB) 7.3.50.20110914-cvs
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /export/home/hjl/bugs/binutils/x32/gold-2/x...done.
(gdb) r
Starting program: /export/home/hjl/bugs/binutils/x32/gold-2/x 
main: 0

Program received signal SIGSEGV, Segmentation fault.
foo () at y.c:8
8  printf ("bar: %d\n", bar);
(gdb) disass
Dump of assembler code for function foo:
   0xf7dfb454 <+0>:push   %rbp
   0xf7dfb455 <+1>:mov%esp,%ebp
=> 0xf7dfb457 <+3>:mov0x88053c3(%rip),%edx# 0x600820
   0xf7dfb45d <+9>:mov$0xf7dfb4d2,%eax
   0xf7dfb462 <+14>:mov%eax,%eax
   0xf7dfb464 <+16>:mov%edx,%esi
   0xf7dfb466 <+18>:mov%rax,%rdi
   0xf7dfb469 <+21>:mov$0x0,%eax
   0xf7dfb46e <+26>:callq  0xf7a8a1f0 
   0xf7dfb473 <+31>:mov0x88053a7(%rip),%eax# 0x600820
   0xf7dfb479 <+37>:add$0x2,%eax
   0xf7dfb47c <+40>:mov%eax,0x880539e(%rip)# 0x600820
   0xf7dfb482 <+46>:pop%rbp
   0xf7dfb483 <+47>:retq   
End of assembler dump.
(gdb) p &bar
$1 = (int *) 0x600820
(gdb) p $rip
$2 = 4158633047
(gdb) p/x $rip
$3 = 0xf7dfb457
(gdb) p/x $rip + 0x88053c3
$4 = 0x10060081a
(gdb) quit
A debugging session is active.

Inferior 1 [process 10205] will be killed.

Quit anyway? (y or n) y
[hjl@gnu-6 gold-2]$ readelf -r y.o

Relocation section '.rela.text' at offset 0x80c contains 5 entries:
 Offset InfoTypeSym.Value  Sym. Name + Addend
0005  1002 R_X86_64_PC32    bar - 4
000a  050a R_X86_64_32      .rodata + 0
001b  1102 R_X86_64_PC32    printf - 4
0021  1002 R_X86_64_PC32    bar - 4
002a  1002 R_X86_64_PC32    bar - 4

Here 0x88053c3(%rip) overflows 32bit address space.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13581] R_X86_64_PC32 against global symbol can't be used for PIC on x32

2012-01-10 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13581

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #3 from H.J. Lu  2012-01-10 20:36:15 
UTC ---
Fixed on mainline and 2.22.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/13507] Gold assumes GOT entry size is the same as ELF class size

2012-01-10 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13507

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
Version|unspecified |2.23 (HEAD)
 Resolution||FIXED

--- Comment #2 from H.J. Lu  2012-01-10 20:38:05 
UTC ---
Fixed by

http://sourceware.org/ml/binutils-cvs/2012-01/msg9.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13600] protected visibility creates bogus relocation

2012-01-17 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13600

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #1 from H.J. Lu  2012-01-17 17:25:44 
UTC ---
I think it is a gcc bug:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19520

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13600] protected visibility creates bogus relocation

2012-01-18 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13600

--- Comment #4 from H.J. Lu  2012-01-18 16:52:10 
UTC ---
Both ld and ld.so go extra efforts to make sure that
the same function pointer value is used for protected
function in the entire process.  If we drop this requirement,
we can simplify ld and ld.so quite a bit.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13616] linker should pad executable sections with nops, not zeros

2012-01-24 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13616

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13616] linker should pad executable sections with nops, not zeros

2012-01-24 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13616

--- Comment #1 from H.J. Lu  2012-01-24 19:49:29 
UTC ---
Created attachment 6173
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6173
A patch

Here is a proposed patch.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13621] dangling global hidden symbol in symtab

2012-01-25 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13621

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #1 from H.J. Lu  2012-01-25 22:11:15 
UTC ---
Since __TMC_END__ is 0, it is placed in .bss section.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13616] linker should pad executable sections with nops, not zeros

2012-01-25 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13616

H.J. Lu  changed:

   What|Removed |Added

   Attachment #6173|0   |1
is obsolete||

--- Comment #2 from H.J. Lu  2012-01-26 01:48:53 
UTC ---
Created attachment 6175
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6175
An improved patch

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13616] linker should pad executable sections with nops, not zeros

2012-01-31 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13616

--- Comment #4 from H.J. Lu  2012-01-31 18:58:16 
UTC ---
It is fixed for i386 and x86-64.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13675] Broken x86 binaries for march < i686 (SIGILL due to multi byte NOP)

2012-02-09 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13675

H.J. Lu  changed:

   What|Removed |Added

   Attachment #6205|application/octet-stream|text/plain
  mime type||

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13668] x86: objdump gets the wrong length for 66-prefixed direct jumps in 64-bit mode

2012-02-09 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13668

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13675] Broken x86 binaries for march < i686 (SIGILL due to multi byte NOP)

2012-02-10 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13675

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from H.J. Lu  2012-02-10 17:23:15 
UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13817] Broken IFUNC support

2012-03-07 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13817

--- Comment #2 from H.J. Lu  2012-03-08 01:14:08 
UTC ---
So we have to use real function, not PLT entry for non-GOT reference to
locally defined IFUNC symbols, at least on i386.  Will revert:

http://sourceware.org/ml/binutils/2011-10/msg00203.html

cause any problems? It will put IRELATIVE relocations in .rel.dyn/.rela.dyn
section, which was the previous behavior.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13817] Broken IFUNC support

2012-03-08 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13817

--- Comment #4 from H.J. Lu  2012-03-08 15:08:22 
UTC ---
I'd like to keep i386 consistent with x86-64 as much as possible.
I will revert both changes.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13817] Broken IFUNC support

2012-03-12 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13817

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #6 from H.J. Lu  2012-03-13 02:27:39 
UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13839] New: Linker fails to build x86-64 Linux 3.3-rc2 kernel

2012-03-13 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13839

 Bug #: 13839
   Summary: Linker fails to build x86-64 Linux 3.3-rc2 kernel
   Product: binutils
   Version: 2.23 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sourceware.org
ReportedBy: hjl.to...@gmail.com
Classification: Unclassified


I got

# make bzImage
...
  LD  init/built-in.o
  LD  .tmp_vmlinux1
arch/x86/kernel/vmlinux.lds:692: undefined symbol `_text' referenced in
expression

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13839] Linker fails to build x86-64 Linux 3.3-rc2 kernel

2012-03-13 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13839

H.J. Lu  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #1 from H.J. Lu  2012-03-13 18:17:40 
UTC ---
It is caused by

http://sourceware.org/ml/binutils-cvs/2012-02/msg00106.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13839] Linker fails to build x86-64 Linux 3.3-rc2 kernel

2012-03-13 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13839

H.J. Lu  changed:

   What|Removed |Added

 CC||amodra at gmail dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13839] Linker fails to build x86-64 Linux 3.3-rc2 kernel

2012-03-13 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13839

--- Comment #2 from H.J. Lu  2012-03-13 18:32:16 
UTC ---
A testcase:

[hjl@gnu-6 pr13839]$ cat defined5.s
.text
.byte 0
[hjl@gnu-6 pr13839]$ cat defined5.t
SECTIONS {
.text : {
  *(.text)
_text = .;
}
_end = .;
}
. = ASSERT((_end - _text <= (512 * 1024 * 1024)), "foo");
[hjl@gnu-6 pr13839]$ make
as   -o defined5.o defined5.s
./ld -T defined5.t  -o defined5 defined5.o
defined5.t:8: undefined symbol `_text' referenced in expression
make: *** [defined5] Error 1
[hjl@gnu-6 pr13839]$

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13839] Linker fails to build x86-64 Linux 3.3-rc2 kernel

2012-03-13 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13839

--- Comment #3 from H.J. Lu  2012-03-14 00:19:03 
UTC ---
This patch seems to work:

diff --git a/ld/ldexp.c b/ld/ldexp.c
index bf0e00b..3b0f4bb 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -606,7 +606,8 @@ fold_name (etree_type *tree)
  output_section);
 }
   else if (expld.phase == lang_final_phase_enum
-   || expld.assigning_to_dot)
+   || (expld.phase != lang_mark_phase_enum
+   && expld.assigning_to_dot))
 einfo (_("%F%S: undefined symbol `%s'"
  " referenced in expression\n"),
tree, tree->name.name);

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13855] internal error, aborting at elf64-x86-64.c line 3396 in elf_x86_64_relocate_section

2012-03-17 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13855

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |WAITING
 CC||hjl.tools at gmail dot com

--- Comment #1 from H.J. Lu  2012-03-17 17:15:26 
UTC ---
Please try binutils 2.22.  If it still fails, please provide
a self-contained testcase.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13855] internal error, aborting at elf64-x86-64.c line 3396 in elf_x86_64_relocate_section

2012-03-20 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13855

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |WAITING

--- Comment #3 from H.J. Lu  2012-03-20 17:03:06 
UTC ---
(In reply to comment #2)
> Still happens with 2.22:
> 
> /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../x86_64-slackware-linux/bin/ld:
> BFD (GNU Binutils) 2.22 internal error, aborting at elf64-x86-64.c line 3370 
> in
> elf_x86_64_relocate_section
> 
> I can't isolate a simple testcase, but reproducing it is not very difficult
> (although it takes a long while):
> 
> git clone https://github.com/sirikata/berkelium.git
> util/build.sh

There is no util/build.sh on chromium11 branch.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13855] internal error, aborting at elf64-x86-64.c line 3396 in elf_x86_64_relocate_section

2012-03-20 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13855

--- Comment #4 from H.J. Lu  2012-03-20 17:12:19 
UTC ---
On Fedora 15, when I ran ./util/build-chromium.sh, I got

  ACTION common_constants_Make_chrome_version.cc
out/Release/obj.target/geni/chrome_version.cc
third_party/tcmalloc/chromium/src/tcmalloc.cc:371:36: error: conflicting
declaration ‘void* (* __malloc_hook)(size_t, const void*)’
/usr/include/malloc.h:176:27: error: ‘__malloc_hook’ has a previous declaration
as ‘void* (* volatile __malloc_hook)(size_t, const void*)’
third_party/tcmalloc/chromium/src/tcmalloc.cc:379:47: error: conflicting
declaration ‘void* (* __realloc_hook)(void*, size_t, const void*)’
/usr/include/malloc.h:179:27: error: ‘__realloc_hook’ has a previous
declaration as ‘void* (* volatile __realloc_hook)(void*, size_t, const void*)’
third_party/tcmalloc/chromium/src/tcmalloc.cc:385:50: error: conflicting
declaration ‘void (* __free_hook)(void*, const void*)’
/usr/include/malloc.h:173:26: error: ‘__free_hook’ has a previous declaration
as ‘void (* volatile __free_hook)(void*, const void*)’
third_party/tcmalloc/chromium/src/tcmalloc.cc:1565:54: error: conflicting
declaration ‘void* (* __memalign_hook)(size_t, size_t, const void*)’
/usr/include/malloc.h:183:27: error: ‘__memalign_hook’ has a previous
declaration as ‘void* (* volatile __memalign_hook)(size_t, size_t, const
void*)’
make: ***
[out/Release/obj.target/allocator/third_party/tcmalloc/chromium/src/tcmalloc.o]
Error 1
make: *** Waiting for unfinished jobs
WARNING - duplicate keys exist in shortcut group IDD_CHROME_FRAME_FIND_DIALOG
  sk duplicates: &N
  fr duplicates: &R
  ro duplicates: &G
  nl duplicates: &O
  no duplicates: &N
   pt-PT duplicates: &P
  sw duplicates: &F
  ca duplicates: &A
  de duplicates: &N
  tr duplicates: &A
  sv duplicates: &S
  da duplicates: &O
  lv duplicates: &R, &U
  pl duplicates: &W
  cs duplicates: &N
  fi duplicates: &K
  es-419 duplicates: &A
  id duplicates: &T
  es duplicates: &B
Failed to install: chromium

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13880] New: -Bsymbolic fails to handle protected function pointer

2012-03-20 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13880

 Bug #: 13880
   Summary: -Bsymbolic fails to handle protected function pointer
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sourceware.org
ReportedBy: hjl.to...@gmail.com
Classification: Unclassified


[hjl@gnu-6 protected-1]$ cat shared.c 
typedef int (*protected_t) (void);

int protected (void) __attribute__ ((visibility ("protected")));

int
protected ()
{
  return 20;
}

protected_t
protected_p ()
{
  return protected;
}
[hjl@gnu-6 protected-1]$ cat main.c 
#include 

typedef int (*protected_t) (void);

int protected (void);
extern protected_t protected_p (void);

void
foo (protected_t f)
{
  printf ("%p\n", f);
  printf ("%d\n", f ());
}

int main()
{
  protected_t f = protected_p ();
  foo (f);
  foo (protected);

  return 0;
}
[hjl@gnu-6 protected-1]$ make
gcc -B./  -O -c main.c
gcc -B./  -O -fPIC -mcmodel=large -c shared.c
./ld -shared -Bsymbolic -o libfoo.so shared.o
./ld: shared.o: relocation R_X86_64_GOTOFF64 against protected function
`protected' can not be used when making a shared object
./ld: final link failed: Bad value
make: *** [libfoo.so] Error 1
[hjl@gnu-6 protected-1]$

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13855] internal error, aborting at elf64-x86-64.c line 3396 in elf_x86_64_relocate_section

2012-03-23 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13855

--- Comment #6 from H.J. Lu  2012-03-23 19:33:44 
UTC ---
util/build-chromium.sh doesn't work with GCC 4.6 on my machine.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13909] PR ld/12570 causes eh_frame_hdr section to be sometimes too large

2012-03-29 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13909

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |WAITING
 CC||hjl.tools at gmail dot com

--- Comment #1 from H.J. Lu  2012-03-29 16:36:10 
UTC ---
Please provide test.c.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13947] Strip applied twice corrupts binaries compiled with --emit-relocs

2012-04-09 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13947

--- Comment #2 from H.J. Lu  2012-04-09 23:26:02 
UTC ---
x86-64 backend uses the reloc_count field in .rela.plt section
to store the number of relocations it has.  It confuses
bfd_elf_final_link to set SEC_RELOC on .rela.plt, which
leads to erroneous .rela.rela.plt section.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13947] Strip applied twice corrupts binaries compiled with --emit-relocs

2012-04-09 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13947

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13947] Strip applied twice corrupts binaries compiled with --emit-relocs

2012-04-09 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13947

--- Comment #3 from H.J. Lu  2012-04-10 00:38:37 
UTC ---
Created attachment 6333
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6333
A patch

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13947] Strip applied twice corrupts binaries compiled with --emit-relocs

2012-04-09 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13947

H.J. Lu  changed:

   What|Removed |Added

Version|unspecified |2.23 (HEAD)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13947] Strip applied twice corrupts binaries compiled with --emit-relocs

2012-04-10 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13947

H.J. Lu  changed:

   What|Removed |Added

  Component|binutils|ld

--- Comment #5 from H.J. Lu  2012-04-10 21:49:59 
UTC ---
(In reply to comment #4)
> (In reply to comment #3)
> > Created attachment 6333 [details]
> > A patch
> 
> I just tried this patch and it doesn't seem to fix anything.  I rebuilt all of
> binutils after applying it, rebuild a binary with --emit-relocs using ld from
> the newly rebuilt binutils and then used the new strip binary.

strip is OK.  It is a linker bug.  You need to use the new linker to
create the executable.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13947] Strip applied twice corrupts binaries compiled with --emit-relocs

2012-04-11 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13947

--- Comment #7 from H.J. Lu  2012-04-11 14:54:19 
UTC ---
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > (In reply to comment #3)
> > > > Created attachment 6333 [details]
> > > > A patch
> > > 
> > > I just tried this patch and it doesn't seem to fix anything.  I rebuilt 
> > > all of
> > > binutils after applying it, rebuild a binary with --emit-relocs using ld 
> > > from
> > > the newly rebuilt binutils and then used the new strip binary.
> > 
> > strip is OK.  It is a linker bug.  You need to use the new linker to
> > create the executable.
> 
> As I said, I tried to link with the ld from the newly rebuilt binutils.  To
> this end, I first created the object file using gcc -c and then looked at the
> output of gcc -Wl,--emit-relocs -v to know what arguments it passes to
> collect2.  I used the same arguments with the freshly built ld-new binary in
> the ld/ subdirectory (just changed the path to the object file) to produce the
> executable.
> 
> Now I can apply strip once and twice, but the third time it fails with:
> 

Please provide outputs of "readelf -Sl" on each ld/strip result.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13947] Strip applied twice corrupts binaries compiled with --emit-relocs

2012-04-11 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13947

--- Comment #9 from H.J. Lu  2012-04-11 16:33:50 
UTC ---
(In reply to comment #8)
> (In reply to comment #7)
> > Please provide outputs of "readelf -Sl" on each ld/strip result.
> 
> Sure, here you are.  After building the executable:
> 

Please provide the executable before strip.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13947] Strip applied twice corrupts binaries compiled with --emit-relocs

2012-04-11 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13947

--- Comment #11 from H.J. Lu  2012-04-12 00:33:30 
UTC ---
The problem is strip removes relocation while keeping
an empty relocation section:

[hjl@gnu-6 pr13947]$ cat foo.s
.text
.globl _start
_start:
.dc.a foo
.data
.globl foo
foo:
.byte 20
[hjl@gnu-6 pr13947]$ gcc -c foo.s
[hjl@gnu-6 pr13947]$ readelf -r foo.o

Relocation section '.rela.text' at offset 0x320 contains 1 entries:
  Offset  Info   Type   Sym. ValueSym. Name +
Addend
  00050001 R_X86_64_64    foo + 0
[hjl@gnu-6 pr13947]$ strip foo.o
[hjl@gnu-6 pr13947]$ readelf -rS foo.o
There are 6 section headers, starting at offset 0x70:

Section Headers:
  [Nr] Name  Type Address   Offset
   Size  EntSize  Flags  Link  Info  Align
  [ 0]   NULL   
        0 0 0
  [ 1] .text PROGBITS   0040
   0008    AX   0 0 4
  [ 2] .rela.textRELA   01f0
     0018   0 1 8
  [ 3] .data PROGBITS   0048
   0001    WA   0 0 4
  [ 4] .bss  NOBITS     004c
       WA   0 0 4
  [ 5] .shstrtab STRTAB     004c
   0021     0 0 1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings), l (large)
  I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

There are no relocations in this file.
[hjl@gnu-6 pr13947]$ 

The empty relocation section confuses strip when mapping sections
to segments.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13947] Strip applied twice corrupts binaries compiled with --emit-relocs

2012-04-11 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13947

--- Comment #12 from H.J. Lu  2012-04-12 01:07:54 
UTC ---
Created attachment 6337
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6337
A patch

This patch removes the empty relocation sections.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13947] Strip applied twice corrupts binaries compiled with --emit-relocs

2012-04-13 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13947

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #16 from H.J. Lu  2012-04-13 23:21:08 
UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13991] powerpc-rtems ld failure [regression]

2012-04-23 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13991

H.J. Lu  changed:

   What|Removed |Added

 CC|hongjiu.lu at intel dot com |hjl.tools at gmail dot com

--- Comment #8 from H.J. Lu  2012-04-23 18:23:33 
UTC ---

(In reply to comment #6)
> I managed to narrow down the time frame when this broke to between 2011-07-09
> and 2011-07-11:
> 
> works - binutils 2.20.1 with rtems 4.10 patches
> works - binutils 2.21.1 with no patches
> broken - binutils 2.22 with no patches
> works - 2.21.52.20110627
> works - 2.21.52.20110701
> works - 2.21.52.20110708
> works - 2.21.52.20110709
> broken - 2.21.52.20110710
> broken - 2.21.52.20110714
> 

Please use "git bisect" on binutils git mirror to identify
which checkin caused it.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14052] binutils 2.22.52.0.2 breaks 3.3.x kernel on i686

2012-05-02 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14052

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #1 from H.J. Lu  2012-05-02 19:48:39 
UTC ---
The differences are

--- good/System.map2012-05-02 12:43:53.775355097 -0700
+++ bad/System.map2012-05-02 12:34:59.780776694 -0700
@@ -50740,7 +50740,7 @@ c0be2640 D dsa_packet_type
 c0be2680 D edsa_packet_type
 c0be26c0 D trailer_packet_type
 c0be2700 D _edata
-c0be3000 D __init_begin
+c0be3000 A __init_begin
 c0be3000 T _sinittext
 c0be3000 T i386_start_kernel
 c0be307d T reserve_ebda_region
@@ -55299,7 +55299,7 @@ c0c7d6c0 d cfd_data
 c0c7d700 d csd_data
 c0c7d740 D softnet_data
 c0c7d800 D __per_cpu_end
-c0c7e000 D __init_end
+c0c7e000 A __init_end
 c0c7e000 R __smp_locks
 c0c84000 B __bss_start
 c0c84000 R __smp_locks_end

The new linker puts __init_begin/__init_end in ABS section.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14052] binutils 2.22.52.0.2 breaks 3.3.x kernel on i686

2012-05-02 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14052

--- Comment #2 from H.J. Lu  2012-05-02 22:12:29 
UTC ---
Does your bootloader relocate the kernel? Absolute symbols
break the relocated kernel.  Linker may need to keep the
output section if there is a symbol defined for it.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14052] binutils 2.22.52.0.2 breaks 3.3.x kernel on i686

2012-05-02 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14052

--- Comment #4 from H.J. Lu  2012-05-03 00:33:11 
UTC ---
Created attachment 6388
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6388
A patch

Please try this patch.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14052] binutils 2.22.52.0.2 breaks 3.3.x kernel on i686

2012-05-02 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14052

H.J. Lu  changed:

   What|Removed |Added

Version|2.22|2.23 (HEAD)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14052] binutils 2.22.52.0.2 breaks 3.3.x kernel on i686

2012-05-03 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14052

--- Comment #9 from H.J. Lu  2012-05-03 12:35:04 
UTC ---
(In reply to comment #6)
> HJ, your patch is cunning enough but really no better than reverting the
> pr13621 change, since your patch will likely result in elflint complaints

My patch avoids ABS symbols only when they are defined in linker
script and passes the testcase for PR 13621.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14052] binutils 2.22.52.0.2 breaks 3.3.x kernel on i686

2012-05-03 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14052

--- Comment #11 from H.J. Lu  2012-05-03 13:47:35 
UTC ---
(In reply to comment #10)
> HJ, you no doubt saw my attempt at trying to interpret the ELF spec to
> rationalize GNU ld generation of SHN_ABS symbols.  Cary demolished my 
> argument.
>  So for one, my claim that there might be a bug in the kernel loaders in their
> treatment of SHN_ABS symbols is rubbish.  Also, it means that the pr13621 
> patch
> should be completely reverted, because that patch made GNU ld create SHN_ABS
> symbols from non-SHN_ABS input symbols.  Your patch prevents some specific
> cases of wrong SHN_ABS symbols, but we should be getting rid of all of them.

Let's revert the whole PR 13621 patch.  Thanks.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14052] binutils 2.22.52.0.2 breaks 3.3.x kernel on i686

2012-05-03 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14052

H.J. Lu  changed:

   What|Removed |Added

   Attachment #6388|0   |1
is obsolete||

--- Comment #12 from H.J. Lu  2012-05-03 22:34:15 
UTC ---
Created attachment 6389
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6389
A new patch

This patch reverts the PR 13621 change and keeps the zero size
section if there is a symbol for it.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14052] binutils 2.22.52.0.2 breaks 3.3.x kernel on i686

2012-05-04 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14052

--- Comment #13 from H.J. Lu  2012-05-04 15:37:54 
UTC ---
(In reply to comment #12)
> Created attachment 6389 [details]
> A new patch
> 
> This patch reverts the PR 13621 change and keeps the zero size
> section if there is a symbol for it.

Please verify if this patch works.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14088] New: Strange addend from readelf

2012-05-09 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14088

 Bug #: 14088
   Summary: Strange addend from readelf
   Product: binutils
   Version: 2.23 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassig...@sourceware.org
ReportedBy: hjl.to...@gmail.com
Classification: Unclassified


On Linux/x86-64, I got

[hjl@gnu-6 runtime]$ cat tst-quadmod2.S
#define BIAS -0x7fff

.section.data.rel.local,"aw",@progbits
.align 8
.Ljmp:
.quadfunc + BIAS
.text
.typefunc, @function
func:
.cfi_startproc
xorl%edi, %edi
jmpexit@PLT
.cfi_endproc
.sizefunc, .-func
.globlfoo
.typefoo, @function
foo:
.cfi_startproc
.cfi_def_cfa_register 6
movq.Ljmp(%rip), %rax
subq$BIAS, %rax
jmp*%rax
.cfi_endproc
.sizefoo, .-foo
[hjl@gnu-6 runtime]$ make libtst-quadmod2.so
gcc -B./ -c -g -o tst-quadmod2.o tst-quadmod2.S
./ld -shared  -o libtst-quadmod2.so tst-quadmod2.o
[hjl@gnu-6 runtime]$ readelf -r libtst-quadmod2.so

Relocation section '.rela.dyn' at offset 0x1e8 contains 1 entries:
  Offset  Info   Type   Sym. ValueSym. Name +
Addend
002003f8  0008 R_X86_64_RELATIVE   
80010240

Relocation section '.rela.plt' at offset 0x200 contains 1 entries:
  Offset  Info   Type   Sym. ValueSym. Name +
Addend
002003f0  00060007 R_X86_64_JUMP_SLO  exit + 0

Addend for R_X86_64_RELATIVE is a negative number. But it is displayed
as an address.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/14091] New: Gold doesn't handle R_X86_64_RELATIVE properly for x32

2012-05-10 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14091

 Bug #: 14091
   Summary: Gold doesn't handle R_X86_64_RELATIVE properly for x32
   Product: binutils
   Version: 2.23 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
AssignedTo: i...@airs.com
ReportedBy: hjl.to...@gmail.com
CC: ccout...@google.com
Classification: Unclassified


[hjl@gnu-6 gold]$ cat main.c 
extern void foo (void);

int
main (void)
{
  foo ();
  return 0;
}
[hjl@gnu-6 gold]$ cat tst-quadmod2.S
#define BIAS 0x7fff

.section.data.rel.local,"aw",@progbits
.align 8
.Ljmp:
.quadfunc + BIAS
.text
.typefunc, @function
func:
.cfi_startproc
xorl%edi, %edi
jmpexit@PLT
.cfi_endproc
.sizefunc, .-func
.globlfoo
.typefoo, @function
foo:
.cfi_startproc
.cfi_def_cfa_register 6
movq.Ljmp(%rip), %rax
subq$BIAS, %rax
jmp*%rax
.cfi_endproc
.sizefoo, .-foo
[hjl@gnu-6 gold]$ make
gcc -B./ -mx32 -g   -c -o main.o main.c
gcc -B./ -mx32 -c -g -o tst-quadmod2.o tst-quadmod2.S
./ld -shared -m elf32_x86_64 -o libtst-quadmod2.so tst-quadmod2.o
gcc -B./ -mx32 -g -o x2 main.o libtst-quadmod2.so -Wl,-rpath,.
./readelf -r --wide libtst-quadmod2.so

Relocation section '.rela.dyn' at offset 0x164 contains 1 entries:
 Offset InfoTypeSym. Value  Symbol's Name + Addend
12f0  0008 R_X86_64_RELATIVE  7fff01a0

Relocation section '.rela.plt' at offset 0x170 contains 1 entries:
 Offset InfoTypeSym. Value  Symbol's Name + Addend
12e8  0107 R_X86_64_JUMP_SLOT    exit + 0
./x2
make: *** [all] Segmentation fault
[hjl@gnu-6 gold]$ 

The problem is

[hjl@gnu-6 gold]$ readelf -rW tst-quadmod2.o
...
 Offset InfoTypeSym. Value  Symbol's Name + Addend
  0101 R_X86_64_64   .text + 7fff

Symbol value + addend > 32bits at run-time.  BFD linker generates:

[hjl@gnu-6 gold]$ make LD=ld
gcc -B./ -mx32 -g   -c -o main.o main.c
gcc -B./ -mx32 -c -g -o tst-quadmod2.o tst-quadmod2.S
ld -shared -m elf32_x86_64 -o libtst-quadmod2.so tst-quadmod2.o
gcc -B./ -mx32 -g -o x2 main.o libtst-quadmod2.so -Wl,-rpath,.
./readelf -r --wide libtst-quadmod2.so

Relocation section '.rela.dyn' at offset 0x158 contains 1 entries:
 Offset InfoTypeSym. Value  Symbol's Name + Addend
002002b0  0026 R_X86_64_RELATIVE64 7fff0190

Relocation section '.rela.plt' at offset 0x164 contains 1 entries:
 Offset InfoTypeSym. Value  Symbol's Name + Addend
[hjl@gnu-6 gold]$ 

The difference is R_X86_64_RELATIVE64 vs R_X86_64_RELATIVE.  For
R_X86_64_64, we need to generate R_X86_64_RELATIVE64.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/14091] Gold doesn't handle R_X86_64_64 properly for x32

2012-05-10 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14091

H.J. Lu  changed:

   What|Removed |Added

Summary|Gold doesn't handle |Gold doesn't handle
   |R_X86_64_RELATIVE properly  |R_X86_64_64 properly for
   |for x32 |x32

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/14091] Gold doesn't handle R_X86_64_64 properly for x32

2012-05-10 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14091

H.J. Lu  changed:

   What|Removed |Added

URL||http://sourceware.org/ml/bi
   ||nutils/2012-05/msg00126.htm
   ||l

--- Comment #1 from H.J. Lu  2012-05-11 04:08:46 
UTC ---
A patch is posted at

http://sourceware.org/ml/binutils/2012-05/msg00126.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/14097] New: Gold doesn't check R_X86_64_RELATIVE64 addend overflow

2012-05-11 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14097

 Bug #: 14097
   Summary: Gold doesn't check R_X86_64_RELATIVE64 addend overflow
   Product: binutils
   Version: 2.23 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
AssignedTo: i...@airs.com
ReportedBy: hjl.to...@gmail.com
CC: ccout...@google.com
Classification: Unclassified


R_X86_64_RELATIVE64 addend is 32-bit and can overflow.
Gold failed to check it:

[hjl@gnu-6 gold]$ cat tst-quadmod4.S
.section.data.rel.local,"aw",@progbits
.align 8
.Ljmp:
.quadfunc + 0x7fff

.text
.typefunc, @function
func:
ret
[hjl@gnu-6 gold]$ make bad LD=./ld.gold
gcc -B./ -mx32 -c -g -o tst-quadmod4.o tst-quadmod4.S
./ld.gold -shared -m elf32_x86_64 -o libtst-quadmod4.so tst-quadmod4.o
readelf -r --wide tst-quadmod4.o

Relocation section '.rela.data.rel.local' at offset 0x4c8 contains 1 entries:
 Offset InfoTypeSym. Value  Symbol's Name + Addend
  0101 R_X86_64_64   .text + 7fff

Relocation section '.rela.debug_line' at offset 0x4d4 contains 1 entries:
 Offset InfoTypeSym. Value  Symbol's Name + Addend
0032  010a R_X86_64_32   .text + 0

Relocation section '.rela.debug_info' at offset 0x4e0 contains 4 entries:
 Offset InfoTypeSym. Value  Symbol's Name + Addend
0006  070a R_X86_64_32   .debug_abbrev + 0
000c  080a R_X86_64_32   .debug_line + 0
0010  010a R_X86_64_32   .text + 0
0014  010a R_X86_64_32   .text + 1

Relocation section '.rela.debug_aranges' at offset 0x510 contains 2 entries:
 Offset InfoTypeSym. Value  Symbol's Name + Addend
0006  060a R_X86_64_32   .debug_info + 0
0010  010a R_X86_64_32   .text + 0
readelf -r --wide libtst-quadmod4.so

Relocation section '.rela.dyn' at offset 0x134 contains 1 entries:
 Offset InfoTypeSym. Value  Symbol's Name + Addend
11c0  0026 R_X86_64_RELATIVE64   -7ec1
[hjl@gnu-6 gold]$ 

When gold generates R_X86_64_RELATIVE64 for R_X86_64_64,
it changes the sign of addend.  BFD linker issues an error:

[hjl@gnu-6 gold]$ ./ld.bfd -shared -m elf32_x86_64 -o libtst-quadmod4.so
tst-quadmod4.o
./ld.bfd: tst-quadmod4.o: addend 0x7fff in relocation R_X86_64_64 against
symbol `.text' at 0x0 in section `.data.rel.local' is out of range
./ld.bfd: final link failed: Bad value
[hjl@gnu-6 gold]$

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/14097] Gold doesn't check R_X86_64_RELATIVE64 addend overflow

2012-05-11 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14097

--- Comment #1 from H.J. Lu  2012-05-11 12:04:09 
UTC ---
Addend overflow can be seen in

template
void
Output_reloc::write(
unsigned char* pov) const
{
  elfcpp::Rela_write orel(pov);
  this->rel_.write_rel(&orel);
  Addend addend = this->addend_;
  if (this->rel_.is_target_specific())
addend = parameters->target().reloc_addend(this->rel_.target_arg(),
   this->rel_.type(), addend);
  else if (this->rel_.is_symbolless())
addend = this->rel_.symbol_value(addend);
  else if (this->rel_.is_local_section_symbol())
addend = this->rel_.local_section_offset(addend);
  orel.put_r_addend(addend);
}

1213  else if (this->rel_.is_symbolless())
(gdb) 
1214addend = this->rel_.symbol_value(addend);
(gdb) 
1217  orel.put_r_addend(addend);
(gdb) p/x addend
$15 = 0x813f
(gdb) p/x this->addend_
$16 = 0x7fff
(gdb) 

Its sign changed.  This is OK for any other ELF32 relocations.
But R_X86_64_RELATIVE64 is an ELF32 relocation applied to a 64-bit
field.  Its addend can't change sign.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/14091] Gold doesn't handle R_X86_64_64 properly for x32

2012-05-11 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14091

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #3 from H.J. Lu  2012-05-11 15:49:45 
UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14088] Strange addend from readelf

2012-05-11 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14088

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #3 from H.J. Lu  2012-05-11 15:50:19 
UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/14066] nopw istruction return signal 4 - Illegal instruction- on cpu VIA Nehemiah

2012-05-13 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14066

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2012-05-13
 CC||hjl.tools at gmail dot com
 Ever Confirmed|0   |1

--- Comment #5 from H.J. Lu  2012-05-13 16:35:52 
UTC ---
Which version of binutils? What is the command line passed to
assembler?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/12571] .plt has no associated .eh_frame/.debug_frame

2012-05-13 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12571

H.J. Lu  changed:

   What|Removed |Added

 Depends on||14105

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14105] New: .plt has no associated .eh_frame/.debug_frame

2012-05-13 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14105

 Bug #: 14105
   Summary: .plt has no associated .eh_frame/.debug_frame
   Product: binutils
   Version: 2.23 (HEAD)
Status: NEW
  Severity: minor
  Priority: P2
 Component: ld
AssignedTo: unassig...@sourceware.org
ReportedBy: hjl.to...@gmail.com
CC: f...@redhat.com, jan.kratoch...@redhat.com
Depends on: 12570
Blocks: 12571
Classification: Unclassified
Target: x86_64-unknown-linux-gnu


+++ This bug was initially created as a clone of Bug #12570 +++

[hjl@gnu-6 pr12570]$ cat x.c
void foo (void);

void
bar ()
{
  foo ();
}
[hjl@gnu-6 pr12570]$ cat dummy.S 
[hjl@gnu-6 pr12570]$ make
gcc -O2 -fpic   -c -o x.o x.c
./ld -shared -o x.so x.o
gcc -c -O2 -fpic -o dummy.o dummy.S
./ld -shared -o y.so dummy.o x.o
readelf -wf x.so
Contents of the .eh_frame section:

 0014  CIE
  Version:   1
  Augmentation:  "zR"
  Code alignment factor: 1
  Data alignment factor: -8
  Return address column: 16
  Augmentation data: 1b

  DW_CFA_def_cfa: r7 (rsp) ofs 8
  DW_CFA_offset: r16 (rip) at cfa-8
  DW_CFA_nop
  DW_CFA_nop

0018 0014 001c FDE cie= pc=0260..0265
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop

readelf -wf y.so
Contents of the .eh_frame section:

 0014  CIE
  Version:   1
  Augmentation:  "zR"
  Code alignment factor: 1
  Data alignment factor: -8
  Return address column: 16
  Augmentation data: 1b

  DW_CFA_def_cfa: r7 (rsp) ofs 8
  DW_CFA_offset: r16 (rip) at cfa-8
  DW_CFA_nop
  DW_CFA_nop

0018 0024 001c FDE cie= pc=0240..0260
  DW_CFA_def_cfa_offset: 16
  DW_CFA_advance_loc: 6 to 0246
  DW_CFA_def_cfa_offset: 24
  DW_CFA_advance_loc: 10 to 0250
  DW_CFA_def_cfa_expression (DW_OP_breg7 (rsp): 8; DW_OP_breg16 (rip): 0;
DW_OP_lit15; DW_OP_and; DW_OP_lit11; DW_OP_ge; DW_OP_lit3; DW_OP_shl;
DW_OP_plus)
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop

0040 0014 0044 FDE cie= pc=0260..0265
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop
  DW_CFA_nop

[hjl@gnu-6 pr12570]$ 

Linker doesn't always generate unwind info for PLT.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12570] .plt has no associated .eh_frame/.debug_frame

2012-05-13 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12570

H.J. Lu  changed:

   What|Removed |Added

 Blocks||14105

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14105] .plt has no associated .eh_frame/.debug_frame

2012-05-13 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14105

--- Comment #1 from H.J. Lu  2012-05-13 18:12:10 
UTC ---
Gold doesn't have this problem.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13909] PR ld/12570 causes eh_frame_hdr section to be sometimes too large

2012-05-13 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13909

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |WAITING

--- Comment #3 from H.J. Lu  2012-05-13 21:56:52 
UTC ---
Please try

http://sourceware.org/ml/binutils/2012-05/msg00173.html

plus:

diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 31b3c57..49387e7 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1016,7 +1016,8 @@ elf_i386_create_dynamic_sections (bfd *dynobj, struct
bfd_link_info *info)

   if (!info->no_ld_generated_unwind_info
   && htab->plt_eh_frame == NULL
-  && htab->elf.splt != NULL)
+  && htab->elf.splt != NULL
+  && bfd_get_section_by_name (dynobj, ".eh_frame") != NULL)
 {
   flagword flags = get_elf_backend_data (dynobj)->dynamic_sec_flags;
   htab->plt_eh_frame
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index aafe60d..399cf8c 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -980,7 +980,8 @@ elf_x86_64_create_dynamic_sections (bfd *dynobj,

   if (!info->no_ld_generated_unwind_info
   && htab->plt_eh_frame == NULL
-  && htab->elf.splt != NULL)
+  && htab->elf.splt != NULL
+  && bfd_get_section_by_name (dynobj, ".eh_frame") != NULL)
 {
   const struct elf_x86_64_backend_data *const abed
 = get_elf_x86_64_backend_data (dynobj);

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13962] Misleading error message when linking a library with an empty library

2012-05-13 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13962

--- Comment #1 from H.J. Lu  2012-05-13 23:40:27 
UTC ---
This works for me:

diff --git a/bfd/elflink.c b/bfd/elflink.c
index 03f07a9..604c984 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -3692,6 +3692,8 @@ error_free_dyn:
 hdr = &elf_tdata (abfd)->dynsymtab_hdr;

   symcount = hdr->sh_size / bed->s->sizeof_sym;
+  if (symcount == 0)
+return TRUE;

   /* The sh_info field of the symtab header tells us where the
  external symbols start.  We don't care about the local symbols at

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13909] PR ld/12570 causes eh_frame_hdr section to be sometimes too large

2012-05-14 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13909

H.J. Lu  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #5 from H.J. Lu  2012-05-14 13:57:18 
UTC ---
Fixes aren't in trunk yet.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/6957] i386 NOPs must be derived from march not mtune

2012-05-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=6957

H.J. Lu  changed:

   What|Removed |Added

 CC||i at corradoroberto dot it

--- Comment #33 from H.J. Lu  2012-05-16 02:42:54 
UTC ---
*** Bug 14066 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/14066] nopw istruction return signal 4 - Illegal instruction- on cpu VIA Nehemiah

2012-05-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14066

H.J. Lu  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||DUPLICATE

--- Comment #7 from H.J. Lu  2012-05-16 02:42:54 
UTC ---
Dup.

*** This bug has been marked as a duplicate of bug 6957 ***

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/13036] cross compiling gas for arm fails using gcc-4.5.2 where 4.5.1 worked

2012-05-16 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13036

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #4 from H.J. Lu  2012-05-16 21:51:31 
UTC ---
I can't reproduce it with a cross binutils to arm-eabi on
Fedora 15 with GCC 4.6.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/13036] cross compiling gas for arm fails using gcc-4.5.2 where 4.5.1 worked

2012-05-18 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13036

--- Comment #7 from H.J. Lu  2012-05-18 10:30:08 
UTC ---
The code in question is:

---
  int base_reg = -1; 
  int reg_incr = -1; 
...
  struct neon_typed_alias firsttype;

  if (skip_past_char (&ptr, '{') == SUCCESS)
leading_brace = 1;

  do
{
  struct neon_typed_alias atype;
  int getreg = parse_typed_reg_or_scalar (&ptr, rtype, &rtype, &atype);

  if (getreg == FAIL)
{
  first_error (_(reg_expected_msgs[rtype]));
  return FAIL;
}

  if (base_reg == -1)
{
  base_reg = getreg;
  if (rtype == REG_TYPE_NQ)
{
  reg_incr = 1;
}
  firsttype = atype;
}
  else if (reg_incr == -1)
{
  reg_incr = getreg - base_reg;
  if (reg_incr < 1 || reg_incr > 2)
{
  first_error (_(incr_error));
  return FAIL;
}
}
  else if (getreg != base_reg + reg_incr * count)
{
  first_error (_(incr_error));
  return FAIL;
}

  if (! neon_alias_types_same (&atype, &firsttype))


Since base_reg == -1 the first time, firsttype is initialized
to atype.  This is a compiler bug and you should report it to
Ubuntu.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14156] --sort-section=alignment trashes init/fini sections, and anything similar

2012-05-24 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14156

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14129] andq and orq instructions give 'invalid operand' error when MSB of 32-bit immediate is set

2012-05-24 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14129

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||hjl.tools at gmail dot com
 Resolution||INVALID

--- Comment #1 from H.J. Lu  2012-05-24 20:05:38 
UTC ---
orq and andq take a signed 32-bit value from -0x8000 to
0x7.  0xFF00 is out of range.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14129] andq and orq instructions give 'invalid operand' error when MSB of 32-bit immediate is set

2012-05-25 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14129

--- Comment #3 from H.J. Lu  2012-05-25 16:35:17 
UTC ---
(In reply to comment #2)
> (In reply to comment #1)
> > orq and andq take a signed 32-bit value from -0x8000 to
> > 0x7.  0xFF00 is out of range.
> 
> (Is 0x7 a typo for 0x7fff?)

Yes, it is a typo.

> 
> Ref: http://download.intel.com/products/processor/manual/325462.pdf
> 
> chapter 3.2, 'and' instruction description:
> 
> "RAX AND imm32 signextended to 64-bits."
> 
> Ditto for OR.
> 
> andq and orq take 32-bit immediate values (and sign extend them to 
> 64-bit)which
> implies that the valid range is 0x0 to 0x. I fail to understand how
> 0xFF00 is out-of-range.
> 
> Although not a standard reference, I would also like to cite that microsoft
> assembler does assemble the above instruction without error.
> 
> I think the bug is valid.

That is a bug in Microsoft assembler:

[hjl@gnu-6 tmp]$ cat i.s
orq $-0x100, %rax
orq $0xFF00, %rax
[hjl@gnu-6 tmp]$ gcc -c i.s
[hjl@gnu-6 tmp]$ objdump -dw i.o

i.o: file format elf64-x86-64


Disassembly of section .text:

 <.text>:
   0:48 0d 00 ff ff ffor $0xff00,%rax
   6:48 0d 00 ff ff ffor $0xff00,%rax
[hjl@gnu-6 tmp]$ 


As you can see, it takes a signed 32-bit immediate, not unsigned.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14170] New: ld: assertion fail /export/gnu/import/git/binutils/bfd/linker.c:641

2012-05-25 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14170

 Bug #: 14170
   Summary: ld: assertion fail
/export/gnu/import/git/binutils/bfd/linker.c:641
   Product: binutils
   Version: 2.23 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sourceware.org
ReportedBy: hjl.to...@gmail.com
Classification: Unclassified


Created attachment 6423
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6423
A testcase

On Linux/x86-64, this testccase causes:

[hjl@gnu-6 new]$ g++ mv1.o  -L.  -B./
./ld: BFD (GNU Binutils) 2.22.52.20120525 assertion fail
/export/gnu/import/git/binutils/bfd/linker.c:641
collect2: ld returned 1 exit status
[hjl@gnu-6 new]$

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14170] ld: assertion fail /export/gnu/import/git/binutils/bfd/linker.c:641

2012-05-25 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14170

--- Comment #1 from H.J. Lu  2012-05-26 00:35:55 
UTC ---
A small testcase:

[hjl@gnu-6 pr14170]$ cat x.c
extern int foo;
extern int bar;

int
_start ()
{
  return foo + bar;
}
[hjl@gnu-6 pr14170]$ cat y.c
int foo __attribute ((visibility("hidden")));
int bar = 1;
[hjl@gnu-6 pr14170]$ cat foo.c
void foo () {}
[hjl@gnu-6 pr14170]$ make
cc-c -o x.o x.c
cc -shared -o libfoo.so -fPIC foo.c
cc-c -o y.o y.c
./ld -o x x.o libfoo.so y.o
./ld: BFD (GNU Binutils) 2.22.52.20120525 assertion fail
/export/gnu/import/git/binutils/bfd/linker.c:641
make: *** [x] Error 1
[hjl@gnu-6 pr14170]$

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14170] ld: assertion fail /export/gnu/import/git/binutils/bfd/linker.c:641

2012-05-26 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14170

--- Comment #3 from H.J. Lu  2012-05-26 15:01:05 
UTC ---
(In reply to comment #2)
> Created attachment 6424 [details]
> partial fix
> 
> This fixes the assert, but doesn't completely cure the bug since we end up 
> with
> a foo local rather than being global hidden.

I posted a fix at:

http://sourceware.org/ml/binutils/2012-05/msg00378.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14170] ld: assertion fail /export/gnu/import/git/binutils/bfd/linker.c:641

2012-05-30 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14170

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #7 from H.J. Lu  2012-05-30 18:55:28 
UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14189] assertion fail ../../bfd/elf32-arm.c:12264

2012-05-31 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14189

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |WAITING
 CC||hjl.tools at gmail dot com

--- Comment #1 from H.J. Lu  2012-05-31 19:09:50 
UTC ---
Please provide a self-contained testcase with only assembly codes
for cross binutils.  Not all binutils developers have ARM cross
compilers.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14189] --gc-sections doesn't work

2012-05-31 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14189

H.J. Lu  changed:

   What|Removed |Added

 CC||rsandifo at sourceware dot
   ||org
Summary|assertion fail  |--gc-sections doesn't work
   |../../bfd/elf32-arm.c:12264 |

--- Comment #3 from H.J. Lu  2012-05-31 21:08:22 
UTC ---
It was caused by

http://sourceware.org/ml/binutils-cvs/2011-03/msg00080.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/14201] gas 2.19.51, Assertion failure when declaring large array: sb_build at /netrel/src/binutils-2.19.51-1/gas/sb.c line 62.

2012-06-07 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14201

H.J. Lu  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #4 from H.J. Lu  2012-06-07 17:06:12 
UTC ---
On Linux/ia32 with GCC 4.1.2, I got

../as-new   -o dump.o
/net/gnu-6/export/gnu/import/git/binutils/gas/testsuite/gas/i386/rept.s
Executing on host: sh -c {../as-new   -o dump.o
/net/gnu-6/export/gnu/import/git/binutils/gas/testsuite/gas/i386/rept.s 2>&1} 
/dev/null gas.out (timeout = 300)

../as-new: out of memory allocating 1073741825 bytes after a total of 135168
bytes

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/14201] gas 2.19.51, Assertion failure when declaring large array: sb_build at /netrel/src/binutils-2.19.51-1/gas/sb.c line 62.

2012-06-07 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14201

--- Comment #5 from H.J. Lu  2012-06-07 17:52:34 
UTC ---
The failure is OS dependent:

#0  sb_scrub_and_add_sb (ptr=0x8196128, s=0xbfffe670)
at /net/gnu-6/export/gnu/import/git/binutils/gas/sb.c:102
#1  0x0805b7c4 in input_scrub_include_sb (from=0xbfffe670, 
position=0x81a097b "", is_expansion=1)
at /net/gnu-6/export/gnu/import/git/binutils/gas/input-scrub.c:287
#2  0x08065bee in do_repeat (count=-1, start=0x812e9cd "REPT", 
end=0x812e9c8 "ENDR")
at /net/gnu-6/export/gnu/import/git/binutils/gas/read.c:3216
#3  0x08065b3d in s_rept (ignore=0)
at /net/gnu-6/export/gnu/import/git/binutils/gas/read.c:3191
#4  0x08062be9 in read_a_source_file (name=0xbfffea19 "/tmp/x.s")
at /net/gnu-6/export/gnu/import/git/binutils/gas/read.c:1076
#5  0x0804caa3 in perform_an_assembly_pass (argc=0, argv=0x819c7dc)
at /net/gnu-6/export/gnu/import/git/binutils/gas/as.c:1095
#6  0x0804cdf0 in main (argc=2, argv=0x819c7d8)
at /net/gnu-6/export/gnu/import/git/binutils/gas/as.c:1242
(gdb) f 2
#2  0x08065bee in do_repeat (count=-1, start=0x812e9cd "REPT", 
end=0x812e9c8 "ENDR")
at /net/gnu-6/export/gnu/import/git/binutils/gas/read.c:3216
3216  input_scrub_include_sb (&many, input_line_pointer, 1);
(gdb) p many
$19 = {
  ptr = 0x37c3c008 "\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte
0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n
.byte 0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte 0\n\n .byte
0\n\n .byte 0\n\n .byte 0\n"..., len = 550502400, max = 1073741824}

While holding a 500M sb, we are allocating another 500M sb.  And
the first 500M sb will be freed right after it:

  input_scrub_include_sb (&many, input_line_pointer, 1);
  sb_kill (&many);

Why not reuse the first 500M sb?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/14213] add support for x32 ABI

2012-06-09 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14213

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |WAITING
 CC||hjl.tools at gmail dot com

--- Comment #1 from H.J. Lu  2012-06-09 14:37:40 
UTC ---
X32 has been supported in gold for a while:

[hjl@gnu-4 kernel]$ ld.gold -V
GNU gold (Linux/GNU Binutils 2.22.52.0.5.20120609) 1.11
  Supported targets:
   elf32-i386
   elf32-i386-freebsd
   elf32-i386-nacl
   elf32-x86-64
   elf32-x86-64-freebsd
   elf32-x86-64-nacl
   elf64-x86-64
   elf64-x86-64-freebsd
   elf64-x86-64-nacl
  Supported emulations:
   elf_i386
   elf_i386_nacl
   elf32_x86_64
   elf32_x86_64_nacl
   elf_x86_64
   elf_x86_64_nacl
[hjl@gnu-4 kernel]$ 

Did you run into any problems?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14207] x86_64 linker can produce a NULL GNU_RELRO segment

2012-06-09 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14207

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14207] x86_64 linker can produce a NULL GNU_RELRO segment

2012-06-09 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14207

--- Comment #2 from H.J. Lu  2012-06-09 17:04:36 
UTC ---
It also happens in

objcopy -z relro (tdata3)
objcopy -shared -z relro (tbss1)

in ld-elf on Linux/x86-64. We never checked NULL segment
in output.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


  1   2   3   4   5   6   7   8   9   10   >