This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: RFC: Is it OK to disassemble instructions twice ?
- From: Tamar Christina <Tamar dot Christina at arm dot com>
- To: "nickc at redhat dot com" <nickc at redhat dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, nd <nd at arm dot com>
- Date: Fri, 16 Aug 2019 12:25:34 +0000
- Subject: RE: RFC: Is it OK to disassemble instructions twice ?
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oWOD5xk7yzoWIf+lFnwm2fPvz0i82B/AqKu0GrJ2hyA=; b=j2Xi1U4g2tDURKusDT6CaIZsV3B+Vlj22PCAXG6mV0niuNaWB30aEWL30YRGWt2IuNeeBXqu80SMdo8eiHUkR4nt2m/jrtNmlN1bgoa2LdUhQZZQr4TTO5q7oX86E4gxGlpifCLS50UeLI1IwkEn11Jo6czfckWV+Ouf0l2bNZHYrpw2FcPlALUMmungu1r6p1vxlJyOKd1C952G3ALZmPxfGfSau38ZnXChWBYfOBZxaenHmtwsCiPWkBKx8CvP4jRgl3BjQYq5Jh0Ue/9JkTfcfNyBoOWKwEjBh5eI6RRADVdejT5rdUs56c8E4V5sPDjoXRqebaWyobhmeYzf2A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L6+H4sVKJ81ctK430HMGqCQhOTjbVID97fueGrNlobVqkJSftTLQUMNSlvsjhdCQ2K3AaUJjyCugR0P5OfzQm9zHau4fHEUQj0saSr/uLQiOlTmA1q9WbiyEaOUigp1RSLYiUeh+Yr4D2Xy4CH7mbe8O2n768tHtBpeGUnQnxbZWgtnTeAY0bDqD+Yldfd7w6f7YE6ETD4CnqXDXjBbRSH2BR15W2YzjOtVFWSHDgnpa8G5aRmQqjFrzlkVrR/cD2VSZri1BknCKPE2Ed6PX/Eof1aYl9e7rGFN4mmQWaEz4VzX+QbUcIQd1pHRsrJqo9o10i9sJNXkBwuoqLY1iug==
- Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Tamar dot Christina at arm dot com;
- References: <87k1bdmsiq.fsf@redhat.com> <DB6PR0802MB2309CB6ECB62E427D6343D4DFFAF0@DB6PR0802MB2309.eurprd08.prod.outlook.com> <1608ab6f-ca05-734d-c48d-63e8051baeba@redhat.com>
Hi Nick,
>
> > Perhaps this should then be controllable by a target hook? Since I
> > don't believe this will ever be the case for Arm/AArch64.
>
> Check the PR - the actual problem was reported for the ARM architecture.
> Plus look at the patch - I have included an ARM specific test that replicates
> the problem.
>
But simply removing the code around the FIXME gets it to generate the right code.
Which I expect it to since the start of each relocation is marked at the start of the insn
Relocation section '.rel.text' at offset 0xfc contains 2 entries:
Offset Info Type Sym.Value Sym. Name
00000002 0000070a R_ARM_THM_CALL 00000000 log_func
00000008 0000080a R_ARM_THM_CALL 0000000c func
Even if you switch between thumb and arm the relocation should still be at the start of the insn's address
unless I'm missing something here?
Regards,
Tamar
> Cheers
> Nick