[Bug ld/22300] Abort in elf32_hppa_relocate_section at elf32-hppa.c:4055 building debian polyml

2017-10-28 Thread dave.anglin at bell dot net
https://sourceware.org/bugzilla/show_bug.cgi?id=22300

--- Comment #6 from dave.anglin at bell dot net ---
Thanks Alan. That was an excellent bit of debugging.

I created a debian bug report for the polyml bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=880023

--
John David Anglin   dave.ang...@bell.net

-- 
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 binutils/22361] Memory Allocation Error stemming from a Conditional jump dependant on an uninitialized value in process_archive (within readelf.c)

2017-10-28 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22361

--- Comment #2 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Alan Modra :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d91f0b20e561e326ee91a09a76206257bde8438b

commit d91f0b20e561e326ee91a09a76206257bde8438b
Author: Alan Modra 
Date:   Sat Oct 28 21:31:16 2017 +1030

PR22361 readelf buffer overflow on fuzzed archive header

PR 22361
* readelf.c (process_archive_index_and_symbols): Ensure ar_size
field is zero terminated for strtoul.
(setup_archive, get_archive_member_name): Likewise.

-- 
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/22300] Abort in elf32_hppa_relocate_section at elf32-hppa.c:4055 building debian polyml

2017-10-28 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22300

--- Comment #5 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Alan Modra :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c0e331c794d6bd75d9be9bea6145513074c33f39

commit c0e331c794d6bd75d9be9bea6145513074c33f39
Author: Alan Modra 
Date:   Sat Oct 28 14:10:55 2017 +1030

PR22300, Abort in elf32_hppa_relocate_section building polyml

polyml produces object files with the wrong OS/ABI for hppa-linux.
This, along with the fact that elf32-hppa.c is using the strictest
backend relocs_compatible, results in wrong merging of ELF symbols.

So, remove the relocs_compatible check in _bfd_elf_merge_symbol.
_bfd_elf_merge_symbol is only called nowadays from within blocks
protected by is_elf_hash_table, so "we are doing an ELF link" as the
removed comment says, is true.

Also relax relocs_compatible for hppa and powerpc.  relocs_compatible
is used for more than just merging symbols, as the name suggests.
This allows objects that are in fact reasonably compatible to be
linked.

PR 22300
* elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
* elf32-hppa.c (elf_backend_relocs_compatible): Define.
* elf32-ppc.c (elf_backend_relocs_compatible): Define.
* elf64-ppc.c (elf_backend_relocs_compatible): Define.

-- 
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 binutils/22360] Wl not wrapping all functions call

2017-10-28 Thread federico.kircheis at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22360

--- Comment #2 from federico.kircheis at gmail dot com  ---
Hi, thank you for your time.


This is my X-problem:

My goal was to find a way for mocking calls to the system for querying what
time it is.

I would like to test functions that may call "time", "chrono::now" and so on
internally, and verify that they behave correctly. 




So my Y-Problem is:
I thought that the "wrap" option could help me, it could be that there are
other ways.

My idea was to create the wrapper function, and call from the wrapper function,
through dlsym(RTLD_NEXT, func_name)) the original function.


I thought that with -wrap I could wrap the calls that are made to the system
(and therefore not linked statically). Maybe I'm trying to wrap the wrong
function if it is linked statically in libstdc++.so.6, right?

This is what would be equivalent of your option a.



I was not aware of LD_AUDIT, it seems it could be an alternate approach.

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