[Bug gas/16858] weak external reference has wrong value

2014-05-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=16858

--- Comment #18 from cvs-commit at gcc dot gnu.org cvs-commit at gcc dot 
gnu.org ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project gdb and binutils.

The branch, master has been updated
   via  296a868924f2c47865676a04515135b03c024bcc (commit)
  from  fb2c6e43b8699da2057e9e33fda09007f112393a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

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

commit 296a868924f2c47865676a04515135b03c024bcc
Author: Nick Clifton ni...@redhat.com
Date:   Mon May 19 14:29:31 2014 +0100

Extend the fix already created for PR 16858 so that it works with x86 PE
targets as well.

PR gas/16858
* config/tc-i386.c (md_apply_fix): Improve the detection of code
symbols for 32-bit PE targets.

---

Summary of changes:
 gas/ChangeLog|6 ++
 gas/config/tc-i386.c |   10 ++
 2 files changed, 16 insertions(+), 0 deletions(-)

-- 
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/16858] weak external reference has wrong value

2014-05-19 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16858

Nick Clifton nickc at redhat dot com changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #19 from Nick Clifton nickc at redhat dot com ---
Closed for now - I am considering how to make a test case for this PR.

-- 
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/16963] New: SEARCH_DIR missing for some targets without sysroot since genscript.sh cleanup (0f70b6b)

2014-05-19 Thread hp at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=16963

Bug ID: 16963
   Summary: SEARCH_DIR missing for some targets without sysroot
since genscript.sh cleanup (0f70b6b)
   Product: binutils
   Version: 2.25 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: hp at sourceware dot org

Commit 0f70b6b was not intended to change the tdir for targets without
sysroot.  However, it removed the default setting when passed as empty to
genscript.sh.  Unfortunately, many genscript.sh invocations in ld/Makefile
accidentally were using a typo'd or plainly wrong tdir-variable (e.g.
$(tdir_cris) instead of $(tdir_crislinux) for the crislinux emulation or
$(tdir_armelf_linux_abi) instead of $(tdir_armelf_linux_eabi), for the
armelf_linux_eabi emulation), causing it to be passed as empty.  For
configurations without --with-sysroot, after commit 0f70b6b this means the
corresponding SEARCH_DIR in the linker-script is gone.  That this effect was
unintended can be seen in the conversation at
http://sourceware.org/ml/binutils/2013-09/msg9.html.  One effect for
targets with dynamic linking and libraries in the intended directory, depending
solely on the now missing SEARCH_DIR (no --rpath-link or other pointers to that
directory) is that linking with libraries depending on DSOs in this directory
causes linker errors.
This is a regression since the binutils 2.24 release.

For example, for a glibc-based toolchain installation with binutils after
commit 0f70b6b, make prog shows this error when requiring dynamic linking
against the rt library in that directory:

/path/to/r101/lib/gcc/crisv32-axis-linux-gnu/4.7.2/../../../../crisv32-axis-linux-gnu/bin/ld:
warning: librt.so.1, needed by ./libnsec.so, not found (try using -rpath or
-rpath-link)
./libnsec.so: undefined reference to `clock_gettime@GLIBC_2.2'
collect2: error: ld returned 1 exit status
make: *** [prog] Error 1

using this code:

prog.c:
#include stdio.h
extern int nsec(void);
int main(void)
{
  printf (Time runs: %d\n, nsec());
}

lib.c:
#include time.h
#include unistd.h
#if !(defined CLOCK_MONOTONIC  defined _POSIX_MONOTONIC_CLOCK)
#error Sorry, wrong system
#endif
int nsec (void)
{
  struct timespec ts;
  if (clock_gettime (CLOCK_MONOTONIC, ts) != 0)
return -1;
  return ts.tv_nsec;
}

Makefile:
all: prog libnsec.so

prog: prog.c libnsec.so
$(CC) -o prog prog.c -lnsec -L.

libnsec.so: lib.c
$(CC) -fPIC -shared -o libnsec.so lib.c -lrt

clean:
-rm *.o *.so prog

-- 
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/16963] SEARCH_DIR missing for some targets without sysroot since genscript.sh cleanup (0f70b6b)

2014-05-19 Thread hp at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=16963

--- Comment #1 from Hans-Peter Nilsson hp at sourceware dot org ---
Patch at http://sourceware.org/ml/binutils/2014-05/msg00164.html.

-- 
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/16963] SEARCH_DIR missing for some targets without sysroot since genscript.sh cleanup (0f70b6b)

2014-05-19 Thread hp at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=16963

Hans-Peter Nilsson hp at sourceware dot org changed:

   What|Removed |Added

   Assignee|unassigned at sourceware dot org   |hp at sourceware dot org

-- 
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/16792] $tooldir/lib is sysrooted when built --with-sysroot

2014-05-19 Thread hp at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=16792

Hans-Peter Nilsson hp at sourceware dot org changed:

   What|Removed |Added

 CC||hp at sourceware dot org

--- Comment #1 from Hans-Peter Nilsson hp at sourceware dot org ---
I believe the sysroot general equivalent should be =/lib.
(Adjustable by target emulparams script to e.g. =/lib32, =/lib64 etc.)

-- 
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/16792] $tooldir/lib is sysrooted when built --with-sysroot

2014-05-19 Thread yselkowitz at cygwin dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16792

--- Comment #2 from Cygwin/X maintainer yselkowitz at cygwin dot com ---
When a sysroot is in use, libraries usually end up in =/lib and =/usr/lib (or
=/mingw/lib for *-*-mingw*), but $exec_prefix/$target_alias/lib has still been
scanned.  Not only is that not happening at the moment, but sysrooting that
directory really doesn't make sense.

-- 
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/16792] $tooldir/lib is sysrooted when built --with-sysroot

2014-05-19 Thread hp at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=16792

--- Comment #3 from Hans-Peter Nilsson hp at sourceware dot org ---
(In reply to Cygwin/X maintainer from comment #2)
 When a sysroot is in use, libraries usually end up in =/lib and =/usr/lib
 (or =/mingw/lib for *-*-mingw*), but $exec_prefix/$target_alias/lib has
 still been scanned.  Not only is that not happening at the moment, but
 sysrooting that directory really doesn't make sense.

I'm not sure whether you agree or disagree. :)

To wit, I'm saying 'don't scan $exec_prefix/$target_alias/lib, scan the
target-adjusted equivalent of =/lib; i.e. =/mingw/lib for *-*-mingw*'. 
...maybe also =/usr/lib where that isn't a capital offence, e.g. *-*-gnu...

IIUC (I'm certainly not sure) sysroot targets don't have (*should* not have)
anything in $exec_prefix/$target_alias/lib but everything in =/lib or
=/usr/lib so  $exec_prefix/$target_alias/lib should not be scanned at all (as
such, that is).

-- 
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/16952] PowerPC LD requests bug report. Issue related to EABI symbols _SDA_BASE_, _SDA2_BASE_

2014-05-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=16952

--- Comment #1 from cvs-commit at gcc dot gnu.org cvs-commit at gcc dot 
gnu.org ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project gdb and binutils.

The branch, master has been updated
   via  93d1b056cb396d6468781fe0e40dd769891bed32 (commit)
  from  ab2f2ff937b25a8ee2ff902fd0bf08299d1dae2e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

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

commit 93d1b056cb396d6468781fe0e40dd769891bed32
Author: Alan Modra amo...@gmail.com
Date:   Tue May 20 11:42:42 2014 +0930

Rewrite ppc32 backend .sdata and .sdata2 handling

1) _SDA_BASE_ and _SDA2_BASE_ and defined automatically, in a similar
   manner to the way _GLOBAL_OFFSET_TABLE_ is handled.  It's a little
   more complicated to remove the symbols because _SDA_BASE_ needs to
   be there if either .sdata or .sbss is present, and similarly for
   _SDA2_BASE.
2) The linker created .sdata and .sdata2 sections used for
   R_PPC_EMB_SDAI16 and R_PPC_EMB_SDA2I16 pointers are created early.
   Nowadays we strip unneeded sections from the output, so it isn't
   necessary to delay creating the sections.
3) The output section for targets of various SDA relocs is now checked
   as per the ABI(s).  We previously allowed .sdata.foo and similar,
   most likely because at some stage we were checking input sections.

Also, the patch fixes a long-standing bug in size_input_sections
that affects the values of symbols defined in stripped input
sections.

PR 16952
bfd/
* elf32-ppc.c (ppc_elf_create_linker_section): Move earlier.
Remove redundant setting of htab-elf.dynobj.  Don't align.
Define .sdata symbols using _bfd_elf_define_linkage_sym.
(ppc_elf_create_glink): Call ppc_elf_create_linker_section.
(create_sdata_sym): Delete.
(elf_allocate_pointer_linker_section): Rename from
elf_create_pointer_linker_section.  Align section.
(ppc_elf_check_relocs): Don't call ppc_elf_creat_linker_section
directly here, or create_sdata_sym.  Set ref_regular on _SDA_BASE_
and _SDA2_BASE_.
(ppc_elf_size_dynamic_sections): Remove ATTRIBUTE_UNUSED on param.
Remove unnecessary tests on _SDA_BASE_ sym.
(maybe_strip_sdasym, ppc_elf_maybe_strip_sdata_syms): New functions.
(ppc_elf_relocate_section): Tighten SDA reloc symbol section checks.
* elf32-ppc.h (ppc_elf_set_sdata_syms): Delete.
(ppc_elf_maybe_strip_sdata_syms): Declare.
ld/
* emulparams/elf32ppccommon.sh (_SDA_BASE_, _SDA2_BASE_): Delete.
* emultempl/ppc32elf.em (ppc_before_allocation): Call
ppc_elf_maybe_strip_sdata_syms.
* ldlang.c (size_input_section): Correct output_offset value
for excluded input sections.

---

Summary of changes:
 bfd/ChangeLog   |   20 
 bfd/elf32-ppc.c |  218 ---
 bfd/elf32-ppc.h |2 +-
 ld/ChangeLog|9 ++
 ld/emulparams/elf32ppccommon.sh |2 -
 ld/emultempl/ppc32elf.em|2 +
 ld/ldlang.c |   15 +--
 7 files changed, 150 insertions(+), 118 deletions(-)

-- 
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/16952] PowerPC LD requests bug report. Issue related to EABI symbols _SDA_BASE_, _SDA2_BASE_

2014-05-19 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16952

Alan Modra amodra at gmail dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |2.25

--- Comment #2 from Alan Modra amodra at gmail dot com ---
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