[Bug ld/16403] New: Spurious undefined reference with --as-needed

2014-01-07 Thread sch...@linux-m68k.org
http://sourceware.org/bugzilla/show_bug.cgi?id=16403

Bug ID: 16403
   Summary: Spurious undefined reference with --as-needed
   Product: binutils
   Version: 2.24
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: sch...@linux-m68k.org
CC: matz at suse dot de
Target: i386-*-*

Created attachment 7339
  --> http://sourceware.org/bugzilla/attachment.cgi?id=7339&action=edit
Linker test case

$ ld --build-id --eh-frame-hdr -m elf_i386 -shared -o
libkdeinit_kaddprinterwizard.so -L. --as-needed --no-undefined crti.o
crtbeginS.o kaddprinterwizard.o --rpath /opt/kde3/lib --rpath /usr/lib/qt3/lib
libkdeprint_management.so libkdeprint.so libkparts.so libkio.so libkdeui.so
libkdesu.so libkwalletclient.so libkdecore.so libDCOP.so -lresolv -lutil
-lart_lgpl_2 -lidn libkdefx.so libqt-mt.so -lXi -lXrandr -lXcursor -lXinerama
-lXft -lfreetype -lfontconfig -ldl -lpng -lXext -lX11 -lSM -lICE -lpthread
-lXrender libfam.so -lrpcsvc -lacl -lattr -lz -lstdc++ -lm -lc -lgcc_s
crtendS.o crtn.o -soname libkdeinit_kaddprinterwizard.so
libc_nonshared.a(stack_chk_fail_local.oS): In function
`__stack_chk_fail_local':
/home/abuild/rpmbuild/BUILD/glibc-2.18.90/debug/stack_chk_fail_local.c:45:
undefined reference to `__stack_chk_fail'

-- 
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/16411] New: Cannot link when source files compiled with -msdata=eabi switch

2014-01-07 Thread sguido at micromotive dot net
https://sourceware.org/bugzilla/show_bug.cgi?id=16411

Bug ID: 16411
   Summary: Cannot link when source files compiled with
-msdata=eabi switch
   Product: binutils
   Version: 2.24
Status: NEW
  Severity: critical
  Priority: P3
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: sguido at micromotive dot net
  Host: Mac OSX Mavericks (10.9)
Target: PowerPC EABI
 Build: 2.24

I have been using v2.16 and v4.2.1 gcc for some time as a powerpc-eabi cross
compiler running on a Mac OSX host successfully. I am trying to update to the
latest version of gcc (v4.8.2) and binutils (v2.24). When I compile the source
code with v4.8.2 gcc using the -msdata=eabi, the source files compile fine, but
in the link stage, I get many errors as follows:

OsInterrupt.c:61:(.text+0x88c): unresolvable R_PPC_EMB_SDA21 relocation against
symbol `OsInterruptNesting'
OsInterrupt.c:61:(.text+0x88c): relocation truncated to fit: R_PPC_EMB_SDA21
against symbol `OsInterruptNesting' defined in .sbss section in rtos.lib(os.o)


The assembly code that is generated is correct as follows:

lbz %r9,OsInterruptNesting@sda21(%r0) # OsInterruptNesting,
addi %r3,%r9,1 # tmp136, OsInterruptNesting,
stb %r3,OsInterruptNesting@sda21(%r0) # OsInterruptNesting, tmp136

In addition, if I compile with v4.8.2 and link with v2.16 linker, it does link
fine. Am I doing something wrong?

Please help as I am stuck and cannot continue.

Thank you!

Sam Guido

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