[Bug binutils/17914] Correct typos in cpu-w65.c license notice.

2015-02-23 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17914

Nick Clifton  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||nickc at redhat dot com
 Resolution|--- |FIXED

--- Comment #3 from Nick Clifton  ---
Fixed

-- 
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/17914] Correct typos in cpu-w65.c license notice.

2015-02-23 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17914

--- Comment #2 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cb967f0d6ce36d566d97cf37b298265434fb6db5

commit cb967f0d6ce36d566d97cf37b298265434fb6db5
Author: Nick Clifton 
Date:   Mon Feb 23 13:39:51 2015 +

Fixes a couple of typos in the license header of the cpu-w65.c file.

PR 17914
* cpu-w65.c: Correct typos in license notice.

-- 
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/17915] Correct typo in include/elf/score.h license notice.

2015-02-23 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17915

Nick Clifton  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||nickc at redhat dot com
 Resolution|--- |FIXED

--- Comment #1 from Nick Clifton  ---
Fixed

-- 
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/17915] Correct typo in include/elf/score.h license notice.

2015-02-23 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17915

--- Comment #2 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8f3102ea1a9954ed00f84a9e3452a79e94953840

commit 8f3102ea1a9954ed00f84a9e3452a79e94953840
Author: Nick Clifton 
Date:   Mon Feb 23 13:43:11 2015 +

Fixes a typo in the license notice in include/elf/score.h

PR 17915
* score.h: Fix typo in license header.

-- 
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/17940] See unexpected diagnostic from msp430-elf-objdump BFD: Dwarf Error: mangled line number section.

2015-02-23 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=17940

--- Comment #2 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0f8f0c57ea4742ad2d9b0598a18243331c1c06e3

commit 0f8f0c57ea4742ad2d9b0598a18243331c1c06e3
Author: Nick Clifton 
Date:   Mon Feb 23 14:53:02 2015 +

Fixes the generation of dwarf line debug information for the msp430, even
in the presence of function sections and linker garbage collection.

PR 17940
* dwarf2dbg.c (out_header): When generating dwarf sections use
real symbols not temps for the start and end symbols.
* config/tc-msp430.h (TC_FORCE_RELOCATION_SUB_SAME): Also prevent
adjustments to relocations in debug sections.
(TC_LINKRELAX_FIXUP): Likewise.

* elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
symbols at end of sections.  Adjust function sizes.

-- 
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/17940] See unexpected diagnostic from msp430-elf-objdump BFD: Dwarf Error: mangled line number section.

2015-02-23 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17940

Nick Clifton  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Nick Clifton  ---
Hi George,

  This should be fixed now.

  The problem was two-fold.  Firstly the assembler was trying to resolve some
of the symbol references used in the .debug_line section when it should have
been leaving this job to the linker.  Secondly in the linker when relaxation
reduced the size of a section it was not correctly updating all of the debug
symbols attached to that section.

Cheers
  Nick

-- 
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


Re: Bug: ld segfault in libbdf-2.22-system on latest Debian stable

2015-02-23 Thread Nicholas Clifton

Hi Rafael,


Please let me know how I can help resolve this issue. Unfortunately, I
can not provide you with the input objects to the linker.


That is a shame as a way to reproduce the problem would really help.


/usr/bin/ld: BFD (GNU Binutils for Debian) 2.22 assertion fail


2.22 is quite an old version of binutils.  Version 2.25 is out now and 
it would be worth trying those sources or, even better, the current 
mainline development sources, so see if the problem has already been fixed.


Cheers
  Nick



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


Re: ld: Wrong error message on unknown -r* and -i* command-line options

2015-02-23 Thread Nicholas Clifton

Hi Igor,


$ ld -iqwerty
ld: bad -rpath option


Thanks very much for reporting this problem.  I have checked in the 
patch below to fix the bug.  In the future though, please could you use 
the binutils bugzilla system to report bugs: https://sourceware.org/bugzilla


Cheers
  Nick

ld/ChangeLog
2015-02-23  Nick Clifton  

* lexsup.c (parse_args): Produce a more reasonable error message
when -ixxx or -rxxx is the last option on the linker command line.

diff --git a/ld/lexsup.c b/ld/lexsup.c
index db74ff8..aa6c3cd 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -999,7 +999,7 @@ parse_args (unsigned argc, char **argv)
   an error message here.  We cannot just make this a warning,
   increment optind, and continue because getopt is too confused
   and will seg-fault the next time around.  */
-   einfo(_("%P%F: bad -rpath option\n"));
+   einfo(_("%P%F: unrecognised option: %s\n"), argv[optind]);

  link_info.relocatable = TRUE;
  config.build_constructors = FALSE;


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


[Bug gas/18009] New: LDR macro on arm can't generate relative address

2015-02-23 Thread goswin-v-b at web dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=18009

Bug ID: 18009
   Summary: LDR macro on arm can't generate relative address
   Product: binutils
   Version: 2.25
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: goswin-v-b at web dot de

The arm assembly has a LDR macro to load constants:

ldr r0, =symbol

This works for symbols (or constants, but that isn't the use case I want) in
the same file and section and also for symbols in other sections or files. For
external symbols it generates an R_ARM_ABS32 linker reference in the next
literals block and adds PC relative addressing to load that.

One can also generate a R_ARM_REL32 linker reference writing

1:  .word symbol - 1b

This correctly stores the relative (to the 1 label) offset of the symbol and
fills that in at link time (and generates a .rel.dyn entry for shared code).


What does not work is writing

1:  ldr r0, =(symbol - 1b)

boot.S:49: Error: constant expression expected -- `ldr r0,=(symbol-1b)'

this works fine with clangs internal assembler and should work here too. There
seems to be no other way to add a R_ARM_REL32 linker reference to the literals
block and load that into a register.

An alternate this could be something like

ldr r0, [pc, =symbol]

-- 
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


Re: Memory read out of bound in readelf from binutils-2.24

2015-02-23 Thread Nicholas Clifton

Hi xiaoqixue_1,


Advisory: Memory read out of bound in readelf from binutils-2.24.
Advisory ID: -
Author : Qixue Xiao
Affected Sofware:  binutils-2.22 - 2.24,(tested), may be more versions


Thanks for reporting this problem.  I believe that the bug has now been 
fixed in the mainline development code.


Cheers
  Nick




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


[Bug gold/18010] New: --gc-sections breaks LLVM's TableGen on ppc64

2015-02-23 Thread markus at trippelsdorf dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=18010

Bug ID: 18010
   Summary: --gc-sections breaks LLVM's TableGen on ppc64
   Product: binutils
   Version: 2.26 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ccoutant at google dot com
  Reporter: markus at trippelsdorf dot de
CC: amodra at gmail dot com, ian at airs dot com
  Host: powerpc64-unknown-linux-gnu
Target: powerpc64-unknown-linux-gnu
 Build: powerpc64-unknown-linux-gnu

also see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65169

gold on ppc64 breaks LLVM's TableGen when --gc-sections is used:

trippels@gcc2-power8 TableGen % /home/trippels/gcc_test/usr/local/bin/g++ -fPIC
-fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long
-Wno-maybe-uninitialized -Wnon-virtual-dtor -Wno-comment -std=c++11
-ffunction-sections -fdata-sections -O3 -mcpu=power8 -fno-strict-aliasing -pipe
-Wl,-O1,--hash-style=gnu,--gc-sections -Wl,-allow-shlib-undefined -Wl,-O3
-Wl,--gc-sections CMakeFiles/llvm-tblgen.dir/AsmMatcherEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/AsmWriterEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/AsmWriterInst.cpp.o
CMakeFiles/llvm-tblgen.dir/CallingConvEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/CodeEmitterGen.cpp.o
CMakeFiles/llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o
CMakeFiles/llvm-tblgen.dir/CodeGenInstruction.cpp.o
CMakeFiles/llvm-tblgen.dir/CodeGenMapTable.cpp.o
CMakeFiles/llvm-tblgen.dir/CodeGenRegisters.cpp.o
CMakeFiles/llvm-tblgen.dir/CodeGenSchedule.cpp.o
CMakeFiles/llvm-tblgen.dir/CodeGenTarget.cpp.o
CMakeFiles/llvm-tblgen.dir/DAGISelEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/DAGISelMatcherEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/DAGISelMatcherGen.cpp.o
CMakeFiles/llvm-tblgen.dir/DAGISelMatcherOpt.cpp.o
CMakeFiles/llvm-tblgen.dir/DAGISelMatcher.cpp.o
CMakeFiles/llvm-tblgen.dir/DFAPacketizerEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/DisassemblerEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/FastISelEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/FixedLenDecoderEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/InstrInfoEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/IntrinsicEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/OptParserEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/PseudoLoweringEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/RegisterInfoEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/SubtargetEmitter.cpp.o
CMakeFiles/llvm-tblgen.dir/TableGen.cpp.o
CMakeFiles/llvm-tblgen.dir/X86DisassemblerTables.cpp.o
CMakeFiles/llvm-tblgen.dir/X86ModRMFilters.cpp.o
CMakeFiles/llvm-tblgen.dir/X86RecognizableInstr.cpp.o
CMakeFiles/llvm-tblgen.dir/CTagsEmitter.cpp.o -o ../../bin/llvm-tblgen
../../lib/libLLVMSupport.so.3.7.0svn ../../lib/libLLVMTableGen.so.3.7.0svn
-Wl,-rpath,"\$ORIGIN/../lib"  

ld.bfd or gold without -Wl,--gc-sections is fine.

rippels@gcc2-power8 llvm_build % ./bin/llvm-tblgen -gen-intrinsic -I
/home/trippels/llvm/include/llvm/IR -I /home/trippels/llvm/lib/Target -I
/home/trippels/llvm/include /home/trippels/llvm/include/llvm/IR/Intrinsics.td
-o /home/trippels/llvm_build/include/llvm/IR/Intrinsics.gen.tmp

--- /home/trippels/Intrinsics.gen.tmp   2015-02-23 07:34:46.987705642 +
+++ /home/trippels/llvm_build/include/llvm/IR/Intrinsics.gen.tmp   
2015-02-23 07:37:26.600608412 +
@@ -42034,7 +42034,7 @@
   const Attribute::AttrKind Atts[] =
{Attribute::NoUnwind,Attribute::ReadNone};
   AS[0] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts);
   NumAttrs = 1;
-  break;
+eak;
   }
 case 17: {
   const Attribute::AttrKind AttrParam1[]= {Attribute::NoCapture};
...
   }
-  return Intrinsic::not_intrinsic;
+retu Intrinsic::not_intrinsic;
 }
 #endif

@@ -70182,7 +70182,7 @@
   break;
 return Intrinsic::arm_mrc2; // "_MoveFromCoprocessor2"
   }
-}  return Intrinsic::not_intrinsic;
+}retu Intrinsic::not_intrinsic;
 }
 #endif

-- 
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/18010] --gc-sections breaks LLVM's TableGen on ppc64

2015-02-23 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18010

--- Comment #1 from Alan Modra  ---
We have a bunch of strings in a string merge section
 .section .rodata.str1.8,"aMS",@progbits,1
all nicely aligned to 8 byte boundaries (as you'd expect from the .8 in the
name).  Somehow the alignment isn't respected and we end up with misaligned
strings.  Since a powerpc64 ld reg+offset form address must be a multiple of 4,
we lose low bits of the address.

This is the code reading the "  break;\n" string.  .LC84 happens to be
defined at .rodata.str1.8+0x570.

1d50:   3d 02 00 00 addis   r8,r2,0
1d52: R_PPC64_TOC16_HA  .LC84+0x8
1d54:   80 e8 00 00 lwz r7,0(r8)
1d56: R_PPC64_TOC16_LO  .LC84+0x8
1d58:   3d 02 00 00 addis   r8,r2,0
1d5a: R_PPC64_TOC16_HA  .LC84+0xc
1d5c:   89 28 00 00 lbz r9,0(r8)
1d5e: R_PPC64_TOC16_LO  .LC84+0xc
1d60:   3d 02 00 00 addis   r8,r2,0
1d62: R_PPC64_TOC16_HA  .rodata.str1.8+0x570
1d64:   90 ea 00 08 stw r7,8(r10)
1d68:   99 2a 00 0c stb r9,12(r10)
1d6c:   e9 28 00 00 ld  r9,0(r8)
1d6e: R_PPC64_TOC16_LO_DS   .rodata.str1.8+0x570

This is linked to
100fdad0:   3d 02 ff fb addis   r8,r2,-5
100fdad4:   80 e8 7b 22 lwz r7,31522(r8)
100fdad8:   3d 02 ff fb addis   r8,r2,-5
100fdadc:   89 28 7b 26 lbz r9,31526(r8)
100fdae0:   3d 02 ff fb addis   r8,r2,-5
100fdae4:   90 ea 00 08 stw r7,8(r10)
100fdae8:   99 2a 00 0c stb r9,12(r10)
100fdaec:   e9 28 7b 18 ld  r9,31512(r8)

For starters, I'll be committing a patch that makes gold complain if LO_DS
relocs attempt to apply a misaligned value.

-- 
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/18010] --gc-sections breaks LLVM's TableGen on ppc64

2015-02-23 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=18010

--- Comment #2 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Alan Modra :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ec86f43468e2591127c493d67882de59dbfd79de

commit ec86f43468e2591127c493d67882de59dbfd79de
Author: Alan Modra 
Date:   Tue Feb 24 18:16:26 2015 +1030

PowerPC64 GOLD: complain on misaligned _DS relocs

PR 18010
* powerpc.cc (Powerpc_relocate_functions::addr16_ds): Always
complain if value is not a multiple of four.
(Target_powerpc::Relocate::relocate): Correct handling of
R_POWERPC_GOT_TPREL16 and R_POWERPC_GOT_TPREL16_LO for ppc64.

-- 
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