[Top][All Lists]

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

[Bug binutils/11513] New: Garbage is loaded into asection#lineno

From: dzidzitop at lavabit dot com
Subject: [Bug binutils/11513] New: Garbage is loaded into asection#lineno
Date: 18 Apr 2010 21:05:16 -0000

For dward and coff symbol tables (generated by MinGW 4.4.0) the BFD library
loads garbage into the symbol table into asymbol#lineno array.
For instance, 30701 as a line_number and 0 as an offset (or symbol pointer).
This happens for any program.

In addition, there is no way to distinguish when alent.u.sym should be used and
when alent.u.offset.

Symtable initialisation code (for already initialised abfd):
static void slurp_symtab(bfd* const abfd)
        long storage;
        bool dynamic = false;
                if ((bfd_get_file_flags(abfd) & HAS_SYMS) == 0) {

        storage = bfd_get_symtab_upper_bound(abfd);
        if (storage == 0) {
                storage = bfd_get_dynamic_symtab_upper_bound(abfd);
                dynamic = false;
        if (storage < 0) {
                //bfd_fatal (bfd_get_filename (abfd));
                syms = (asymbol**) malloc(storage);
        if (dynamic) {
                symCount = bfd_canonicalize_dynamic_symtab(abfd, syms);
        else {
                symCount = bfd_canonicalize_symtab(abfd, syms);
        if (symCount < 0) {
                //bfd_fatal (bfd_get_filename (abfd));

           Summary: Garbage is loaded into asection#lineno
           Product: binutils
           Version: 2.21 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: dzidzitop at lavabit dot com
                CC: bug-binutils at gnu dot org


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