This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Disabling Consistency Checks
- From: Eric Neblock <c_eric at sbcglobal dot net>
- To: binutils at sourceware dot org
- Date: Mon, 01 Dec 2014 12:32:08 -0600
- Subject: Disabling Consistency Checks
- Authentication-results: sourceware.org; auth=none
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello all,
I'm working on a program based on this (
http://mainisusuallyafunction.blogspot.com/2011/01/implementing-breakpoints-on-x86-linux.html
) that will stop a child when a certain function is called.
When trying to implement a hardware break for a separate program (by
using an execv) that is dynamically linked, ld complains with the following:
Inconsistency detected by ld.so: ../elf/dl-runtime.c: 79: _dl_fixup:
Assertion `((reloc->r_info) & 0xffffffff) == 7' failed!
Now, I'm sure this has to deal with altering another program's code
section and there are obvious reasons why we don't want that to happen;
however, is there a way that I can disable ld's check? Or (perhaps even
better), what would be the correct way of having Program A stop Program
B when a certain line of code is executed that doesn't involve preloading.
I want to avoid preloading, because right now I want to stop whenever a
C program executes a malloc; however, tomorrow I may want to stop at a
printf so I'm trying to make things as dynamic as possible.
If there is any other information that I can provide, please let me know.
Thanks,
Eric
Helpful information:
uname -a:
Linux thinkpad 3.11.10-21-xen #1 SMP Mon Jul 21 15:28:46 UTC 2014
(9a9565d) x86_64 x86_64 x86_64 GNU/Linux
lsb_release -a:
LSB Version: n/a
Distributor ID: openSUSE project
Description: openSUSE 13.1 (Bottle) (x86_64)
Release: 13.1
Codename: Bottle
gcc --version:
gcc (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388]
ld --version:
GNU ld (GNU Binutils; openSUSE 13.1) 2.23.2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQEcBAEBAgAGBQJUfLQoAAoJEKnJ+4MkCuMT+AgH/3htI5RktX0R/S5X5g5KjrfQ
vfkuICRZMdN6VSvL8V/ux+vOyyA4PF1sPQE17bx82JEgxnETyRwPC4RUyDUsr7Iy
fkW/PYU//iDWvg9A9IsDpX7B1cw1RhFtLKhQ0NB4xutb+Zby9cqbSfwESktBxaOn
v7/T9idbLyDxRF9arrMFvcpx7lB2PzZimtJEwq37E/BfO45pJN4NWMkL6Q6axpaZ
/bYq08hS9ndg5wcb67FGSXDmWTIRkn6rbVuaVy1l/mnYRUYGTJnGMnpxgwM3aQ/h
j1Z3Cw460JVOfZXWs4z1CBeAhf72QzWbkp5d2SQLMAXeYuW0CO0R6udcdepXW4w=
=6Alh
-----END PGP SIGNATURE-----