[Bug binutils/10656] New: readelf: move a variable to a header file

2009-09-18 Thread d dot g dot gorbachev at gmail dot com
 

-- 
   Summary: readelf: move a variable to a header file
   Product: binutils
   Version: 2.21 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: d dot g dot gorbachev at gmail dot com
CC: bug-binutils at gnu dot org


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

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/10656] readelf: move a variable to a header file

2009-09-18 Thread d dot g dot gorbachev at gmail dot com

--- Additional Comments From d dot g dot gorbachev at gmail dot com  
2009-09-18 09:55 ---
Created an attachment (id=4204)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4204&action=view)
Patch (trivial)


-- 


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

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10406] ld terminated with signal 11 [segmentation fault]

2009-09-18 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2009-09-18 
12:42 ---
Subject: Bug 10406

CVSROOT:/cvs/src
Module name:src
Changes by: amo...@sourceware.org   2009-09-18 12:41:53

Modified files:
bfd: ChangeLog elf32-ppc.c 

Log message:
PR ld/10406
* elf32-ppc.c (ppc_elf_howto_raw): Make R_PPC_EMB_SDAI16 and
R_PPC_EMB_SDA2I16 complain_overflow_signed.
(create_sdata_sym): Pass info rather than htab.
Update all callers.  Ensure symbols are hidden.
(ppc_elf_check_relocs): Allow SDAREL16 when shared.
(ppc_elf_size_dynamic_sections): When shared, equate _SDA_BASE_ to
_GLOBAL_OFFSET_TABLE_.
(elf_finish_pointer_linker_section): Don't assume that sdata base
symbol is always at 0x8000 offset.  Don't subtract the addend here.
(is_static_defined): New function.
(ppc_elf_relocate_section): Verify symbol base used in SDA relocs
is statically defined.  Clear addend for EMB_SDAI16 and EMB_SDA2I16
relocs.  Downgrade error on unexpected section for EMB_SDA2REL
reloc symbols to a warning.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.4786&r2=1.4787
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/elf32-ppc.c.diff?cvsroot=src&r1=1.267&r2=1.268



-- 


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

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10406] ld terminated with signal 11 [segmentation fault]

2009-09-18 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2009-09-18 
12:43 ---
Subject: Bug 10406

CVSROOT:/cvs/src
Module name:src
Branch: binutils-2_20-branch
Changes by: amo...@sourceware.org   2009-09-18 12:43:28

Modified files:
bfd: ChangeLog elf32-ppc.c 

Log message:
PR ld/10406
* elf32-ppc.c (ppc_elf_howto_raw): Make R_PPC_EMB_SDAI16 and
R_PPC_EMB_SDA2I16 complain_overflow_signed.
(create_sdata_sym): Pass info rather than htab.
Update all callers.  Ensure symbols are hidden.
(ppc_elf_check_relocs): Allow SDAREL16 when shared.
(ppc_elf_size_dynamic_sections): When shared, equate _SDA_BASE_ to
_GLOBAL_OFFSET_TABLE_.
(elf_finish_pointer_linker_section): Don't assume that sdata base
symbol is always at 0x8000 offset.  Don't subtract the addend here.
(is_static_defined): New function.
(ppc_elf_relocate_section): Verify symbol base used in SDA relocs
is statically defined.  Clear addend for EMB_SDAI16 and EMB_SDA2I16
relocs.  Downgrade error on unexpected section for EMB_SDA2REL
reloc symbols to a warning.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&only_with_tag=binutils-2_20-branch&r1=1.4761.2.16&r2=1.4761.2.17
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/elf32-ppc.c.diff?cvsroot=src&only_with_tag=binutils-2_20-branch&r1=1.267&r2=1.267.2.1



-- 


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

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10406] ld terminated with signal 11 [segmentation fault]

2009-09-18 Thread olof at baah dot se

--- Additional Comments From olof at baah dot se  2009-09-18 18:31 ---
Subject: Re:  ld terminated with signal 11 [segmentation fault]

I can try but I think you need to give me some hints. I'm not too
familiar with automake & gdb.

1) How can till the configure script to insert -g in the makefiles it
creates for binutils? I didn't find anything on the net or with
configure --help. Or should I do it some other way?

2) Where can I read about backtrace generation? I suppose that is
something gdb can provide?

// Olof

2009/9/14 amodra at bigpond dot net dot au :
>
> --- Additional Comments From amodra at bigpond dot net dot au  2009-09-14 
> 07:12 ---
> Yes, the error may well only occur when ld is linking non-gcc object files.
> Regardless, ld should not segfault.  Can you build binutils with debug info 
> and
> provide a backtrace?
>
> --
>
>
> http://sourceware.org/bugzilla/show_bug.cgi?id=10406
>
> --- You are receiving this mail because: ---
> You reported the bug, or are watching the reporter.
>


-- 


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

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10406] ld terminated with signal 11 [segmentation fault]

2009-09-18 Thread amodra at bigpond dot net dot au

--- Additional Comments From amodra at bigpond dot net dot au  2009-09-19 
02:22 ---
I've committed some patches that may stop the segfault.  Please try with the
latest sources. (At the moment that means CVS, the snapshot doesn't yet have my
patch).

You'll get -g by default but also get -O2 which probably will make the debug
harder to interpret, so:

CFLAGS="-g -O0" /path/to/sources/configure ...
make
ulimit -c unlimited

gdb
core core
backtrace

The core file might be called core.nn

-- 


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

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10406] ld terminated with signal 11 [segmentation fault]

2009-09-18 Thread olof at baah dot se

--- Additional Comments From olof at baah dot se  2009-09-19 05:40 ---
Subject: Re:  ld terminated with signal 11 [segmentation fault]

No great success, the latest cvs doesn't buid, at least not on my system.

if [ -r sysinfo.c ]; then \
  gcc -c -I. -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-Werror -g -O0 sysinfo.c -Wno-error ; \
else \
  gcc -c -I. -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-Werror -g -O0 ./sysinfo.c -Wno-error ; \
fi
sysinfo.c:1: warning: return type defaults to ‘int’
sysinfo.c:1: warning: function declaration isn’t a prototype
if [ -r syslex.c ]; then \
  gcc -c -I. -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-Werror -g -O0 syslex.c -Wno-error ; \
else \
  gcc -c -I. -I. -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-Werror -g -O0 ./syslex.c -Wno-error ;\
fi
syslex.c:1: warning: return type defaults to ‘int’
syslex.c:1: warning: function declaration isn’t a prototype
gcc -g -O0  -o sysinfo sysinfo.o syslex.o
syslex.o: In function `main':
/usr/local/src/src/binutils/syslex.c:1: multiple definition of `main'
sysinfo.o:/usr/local/src/src/binutils/sysinfo.c:1: first defined here

Both of these files contain "main() { return 0; }"

Want me to try the .19 sources with some patch?

// Olof


2009/9/19 amodra at bigpond dot net dot au :
>
> --- Additional Comments From amodra at bigpond dot net dot au  2009-09-19 
> 02:22 ---
> I've committed some patches that may stop the segfault.  Please try with the
> latest sources. (At the moment that means CVS, the snapshot doesn't yet have 
> my
> patch).
>
> You'll get -g by default but also get -O2 which probably will make the debug
> harder to interpret, so:
>
> CFLAGS="-g -O0" /path/to/sources/configure ...
> make
> ulimit -c unlimited
> 
> gdb
> core core
> backtrace
>
> The core file might be called core.nn
>
> --
>
>
> http://sourceware.org/bugzilla/show_bug.cgi?id=10406
>
> --- You are receiving this mail because: ---
> You reported the bug, or are watching the reporter.
>


-- 


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

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


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils