LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Openrisc > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: Matjaz Breskvar <phoenix@o...>
    Date: Mon, 17 Nov 2003 00:14:13 +0100
    Subject: Re: [openrisc] gdb stub instead of JTAG?
    Top

    * Scott Furman (sfurman@r...) wrote:
    > Scott Furman wrote:
    > 
    > >I have a bunch of linker fixes which cure the problems with linking 
    > >with the -r flag.  I don't think they would fix problems of the sort 
    > >you describe, but it's worth a try.  I'll submit my patches tomorrow.
    > 
    > Attached are my linker fixes.  I have a fair degree of confidence in 
    > this patch since the code has been in daily use at my company for 
    > several months.  Nonetheless, I would appreciate it if someone could 
    > apply these changes to their linker and try to build uClinux and report 
    > any problems.  Once I get the green light, I'll check in.
    
    i've applied the patch to binutils and built latest toolchain
    from opencores cvs with it and try to build uclinux & linux but the linker
    segfaulted. attached is output from gdb if it helps - i didn't really have
    time to look into it but i'm very interested in this patch since i
    came accross '-r' linker bug.
    
    regards,
    p.
    (gdb) run
    Starting program: /opt/bin/or32-uclinux-ld -r -o kernel.o sched.o dma.o
    fork.o exec_domain.o panic.o printk.o module.o exit.o itimer.o info.o time.o
    softirq.o resource.o sysctl.o acct.o capability.o ptrace.o timer.o user.o
    signal.o sys.o kmod.o context.o uid16.o ksyms.o
    
    Program received signal SIGSEGV, Segmentation fault.
    0x08061264 in generic_link_add_symbol_list (abfd=0x80bf378, info=0x80acea0,
        symbol_count=134895936, symbols=0x80c0178, collect=bfd_fffalse)
        at ../../binutils/bfd/linker.c:1333
    1333                  if (h->sym == (asymbol *) NULL
    (gdb) bt
    #0  0x08061264 in generic_link_add_symbol_list (abfd=0x80bf378,
    info=0x80acea0,
        symbol_count=134895936, symbols=0x80c0178, collect=bfd_fffalse)
        at ../../binutils/bfd/linker.c:1333
    #1  0x08060c39 in generic_link_add_object_symbols (abfd=0x80bf378,
    info=0x80acea0,
        collect=bfd_fffalse) at ../../binutils/bfd/linker.c:794
    #2  0x08060c01 in generic_link_add_symbols (abfd=0xffffffff, info=0x80acea0,
    collect=134978180)
        at ../../binutils/bfd/linker.c:762
    #3  0x08060b8f in _bfd_generic_link_add_symbols (abfd=0x80bf378,
    info=0x80acea0)
        at ../../binutils/bfd/linker.c:731
    #4  0x0804f3e1 in load_symbols (entry=0x80ada44, place=0xbffff770)
        at ../../binutils/ld/ldlang.c:1569
    #5  0x0804fcae in open_input_bfds (s=0x80ada44, force=bfd_fffalse)
        at ../../binutils/ld/ldlang.c:1967
    #6  0x08052149 in lang_process () at ../../binutils/ld/ldlang.c:4101
    #7  0x08054725 in main (argc=29, argv=0x0) at ../../binutils/ld/ldmain.c:399
    #8  0x420158f7 in __libc_start_main () from /lib/i686/libc.so.6
    (gdb) list
    1328                 hash table other than the generic hash table, so we
    only
    1329                 do this if we are certain that the hash table is a
    1330                 generic one.  */
    1331              if (info->hash->creator == abfd->xvec)
    1332                {
    1333                  if (h->sym == (asymbol *) NULL
    1334                      || (! bfd_is_und_section (bfd_get_section (p))
    1335                          && (! bfd_is_com_section (bfd_get_section (p))
    1336                              || bfd_is_und_section (bfd_get_section
    (h->sym)))))
    1337                    {
    (gdb) print h
    $1 = (struct generic_link_hash_entry *) 0x80b9a84
    (gdb) print h->sym
    $2 = (struct symbol_cache_entry *) 0xffffffff
    (gdb) print info
    $3 = (struct bfd_link_info *) 0x80acea0
    (gdb) print info->hash
    $4 = (struct bfd_link_hash_table *) 0x80b365c
    (gdb) print info->hash->creator
    $5 = (const struct bfd_target *) 0x80a7180
    (gdb) print abfd->xvec
    $6 = (const struct bfd_target *) 0x80a7180
    (gdb)

    ReferenceAuthor
    RE: [openrisc] gdb stub instead of JTAG?Heiko Panther
    RE: [openrisc] gdb stub instead of JTAG?Robert Cragie
    Re: [openrisc] gdb stub instead of JTAG?Matjaz Breskvar
    Re: [openrisc] gdb stub instead of JTAG?Scott Furman
    Re: [openrisc] gdb stub instead of JTAG?Scott Furman

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.