bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/3169] elfxx-ia64.c doesn't support @ltoff(@fptr(_DYNAMIC#))


From: hjl at lucon dot org
Subject: [Bug ld/3169] elfxx-ia64.c doesn't support @ltoff(@fptr(_DYNAMIC#))
Date: 11 Sep 2006 22:17:37 -0000

------- Additional Comments From hjl at lucon dot org  2006-09-11 22:17 -------
I used

--- elf64-ia64.c        2006-09-11 15:13:43.000000000 -0700
+++ elf64-ia64.c.new    2006-09-07 16:12:39.000000000 -0700
@@ -3275,7 +3275,14 @@ allocate_fptr (dyn_i, data)
              if (!bfd_elf_link_record_local_dynamic_symbol
                    (x->info, h->root.u.def.section->owner,
                     global_sym_index (h)))
-               return FALSE;
+               {
+                 /* Something is really wrong. If we continue, we will
+                    run into more problems later.  */
+                 (*_bfd_error_handler)
+                   (_("%B: failed to record local dynamic symbol `%s'"),
+                    h->root.u.def.section->owner, h->root.root.string);
+                 abort ();
+               }
            }

          dyn_i->want_fptr = 0;

However, it doesn't work for this:
address@hidden 3169]$ cat foo.s
        .hidden __bss_start
        .text
        .proc   foo#
        .global foo#
foo#:
        addl address@hidden(@fptr(_DYNAMIC#)),gp
        .endp foo
address@hidden 3169]$ cat bar.s
        .text
        .proc bar#
bar:
//      addl r14 = @ltoff(@fptr(foo#)), gp
        .endp bar#

address@hidden 3169]$ make
./as -x -o bar.o bar.s
./as -x -o foo.o foo.s
./ld -o libfoo.so -shared bar.o foo.o
make: *** [libfoo.so] Segmentation fault
make: *** Deleting file `libfoo.so'
address@hidden 3169]$ gdb ld
GNU gdb 6.5.50.20060816-cvs
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...
Using host libthread_db library "/lib64/libthread_db.so.1".
(gdb) r  -o libfoo.so -shared bar.o foo.o
Starting program: /export/home/hjl/bugs/binutils/3169/ld -o libfoo.so -shared
bar.o foo.o

Program received signal SIGSEGV, Segmentation fault.
0x0000000000436c1c in global_sym_index (h=0x6e5960) at elf64-ia64.c:3239
3239      for (p = elf_sym_hashes (obj); *p != h; ++p)
(gdb) p obj
No symbol "obj" in current context.
(gdb) p ((h->root.u.def.section->owner) -> tdata.elf_obj_data)->sym_hashes
$1 = (struct elf_link_hash_entry **) 0x0
(gdb)


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=3169

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]