Linking to Gt.m object files

2012-02-22 Thread Mike Dupont
I have done a s imple experiment with trying binutils on the a gt.m binary

I would like to work on getting objtools to support these binaries,
and the objdump works, but the linker fails.
Attached is a mini program that just calls some internal routine and
the object file produced by it.

GTM compiles the source code to obj files and loads them into memory,
http://tinco.pair.com/bhaskar/gtm/doc/books/pg/OpenVMS_manual/zlinking_ch3.html


 g++ serenji.o
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
0 has invalid symbol index 11
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
1 has invalid symbol index 12
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
2 has invalid symbol index 2
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
3 has invalid symbol index 2
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
4 has invalid symbol index 11
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
5 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
6 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
7 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
8 has invalid symbol index 2
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
9 has invalid symbol index 2
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
10 has invalid symbol index 12
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
11 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
12 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
13 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
14 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
15 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
16 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
17 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
18 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
19 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
20 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
21 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
22 has invalid symbol index 21
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/crt1.o: In
function `_start':
(.text+0x18): undefined reference to `main'
serenji.o:serenji.o:(.text+0x67): undefined reference to `_Serenji.SHELL'
serenji.o:serenji.o:(.text+0x6c): undefined reference to `_Serenji'
/usr/bin/ld.bfd.real: BFD (GNU Binutils for Ubuntu) 2.21.53.20110810
internal error, aborting at ../../bfd/reloc.c line 6281 in
bfd_generic_get_relocated_section_contents

/usr/bin/ld.bfd.real: Please report this bug.

collect2: ld returned 1 exit status

-- 
James Michael DuPont
Member of Free Libre Open Source Software Kosova http://flossk.org


serenji.o
Description: application/object
serenji	; Wrapper for Serenji shell
	d SHELL^%Serenji("@gj")
	q
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13683] usage tracking by --gc-sections ignores a --defsym mapping

2012-02-22 Thread cvs-commit at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=13683

--- Comment #11 from cvs-commit at gcc dot gnu.org  2012-02-22 16:27:42 UTC ---
CVSROOT:/cvs/src
Module name:src
Changes by:ni...@sourceware.org2012-02-22 16:27:35

Modified files:
ld : ChangeLog ldexp.c ldexp.h ldlang.c 
ld/testsuite   : ChangeLog 
ld/testsuite/ld-cris: tls-gc-68.d tls-gc-69.d tls-gc-70.d 
  tls-gc-71.d tls-gc-75.d tls-gc-76.d 
  tls-gc-79.d 
ld/testsuite/ld-gc: gc.exp 
Added files:
ld/testsuite/ld-gc: pr13683.c pr13683.d 

Log message:
PR ld/13683
* ldlang.c (lang_process): Rerun lang_do_assignments before
starting garbage collection.
* ldexp.c (fold_name): Generate a reloc for defined symbols
found without an associated output section during the mark phase.
(exp_fold_tree_1): Continue processing an expression, even if we
are unable to fold it, if we are in the first two evaluation
phases.
* ldexp.h (enum lang_phase_type): Add descriptions of the phases.

* ld-gc/pr13683.c: New test source file.
* ld-gc/pr13683.d: New test control and output file.
* ld-gc/gc.exp: Run the pr13683 test.

* ld-cris/tls-gc-68: Update expected symbol table dump.
* ld-cris/tls-gc-69: Likewise.
* ld-cris/tls-gc-70: Likewise.
* ld-cris/tls-gc-71: Likewise.
* ld-cris/tls-gc-75: Likewise.
* ld-cris/tls-gc-76.d: Likewise.
* ld-cris/tls-gc-79.d: Likewise.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/ChangeLog.diff?cvsroot=src&r1=1.2410&r2=1.2411
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/ldexp.c.diff?cvsroot=src&r1=1.96&r2=1.97
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/ldexp.h.diff?cvsroot=src&r1=1.30&r2=1.31
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/ldlang.c.diff?cvsroot=src&r1=1.383&r2=1.384
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ChangeLog.diff?cvsroot=src&r1=1.1494&r2=1.1495
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-cris/tls-gc-68.d.diff?cvsroot=src&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-cris/tls-gc-69.d.diff?cvsroot=src&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-cris/tls-gc-70.d.diff?cvsroot=src&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-cris/tls-gc-71.d.diff?cvsroot=src&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-cris/tls-gc-75.d.diff?cvsroot=src&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-cris/tls-gc-76.d.diff?cvsroot=src&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-cris/tls-gc-79.d.diff?cvsroot=src&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-gc/pr13683.c.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-gc/pr13683.d.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-gc/gc.exp.diff?cvsroot=src&r1=1.12&r2=1.13

-- 
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/13683] usage tracking by --gc-sections ignores a --defsym mapping

2012-02-22 Thread nickc at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13683

Nick Clifton  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||FIXED

--- Comment #12 from Nick Clifton  2012-02-22 16:29:39 
UTC ---
Hi Guys,

  Alan's patch is better than mine, so I have checked it in, along with a new
linker testcase and some tweaks to the cris linker tests that were affected. 
(No other target showed regressions because of this patch).

Cheers
  Nick

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