* [PATCHv2 1/2] Add is_executable to Dwfl_Module.
@ 2014-09-10 19:22 Jan Kratochvil
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kratochvil @ 2014-09-10 19:22 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]
On Wed, 10 Sep 2014 20:56:48 +0200, Mark Wielaard wrote:
> I don't think it is very helpful or productive to refuse to have a
> technical opinion on a fair question about a code change you are
> proposing.
By ": 1" I give a promise to compiler I will use only its single bit.
Smart compiler with -fwhole-program, -flto etc. could make it 'unsigned char'
when the struct is not externally visible and therefore ABI-constrained.
But I see in real world the -O2 x86_64 'bool:1' code is much more horrible
compared to plain 'bool' than I expected, so when we already discuss it I have
changed it to 'bool'.
400406: 88 44 24 e9 mov %dl,-0x17(%rsp)
vs.
400400: 0f b6 44 24 e8 movzbl -0x18(%rsp),%eax
40040b: c1 e2 03 shl $0x3,%edx
40040e: 83 e0 f7 and $0xfffffff7,%eax
400411: 09 d0 or %edx,%eax
400413: 88 44 24 e8 mov %al,-0x18(%rsp)
Thanks,
Jan
[-- Attachment #2: attachment.mht --]
[-- Type: message/rfc822, Size: 47 bytes --]
WzxlbWFpbC5tZXNzYWdlLk1lc3NhZ2UgaW5zdGFuY2UgYXQgMHgyYjZkODc4Pl0=
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCHv2 1/2] Add is_executable to Dwfl_Module.
@ 2014-09-10 20:33 Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2014-09-10 20:33 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]
On Wed, 2014-09-10 at 21:22 +0200, Jan Kratochvil wrote:
> On Wed, 10 Sep 2014 20:56:48 +0200, Mark Wielaard wrote:
> > I don't think it is very helpful or productive to refuse to have a
> > technical opinion on a fair question about a code change you are
> > proposing.
>
> By ": 1" I give a promise to compiler I will use only its single bit.
> Smart compiler with -fwhole-program, -flto etc. could make it 'unsigned char'
> when the struct is not externally visible and therefore ABI-constrained.
Yeah, I understood why you proposed it for the new field. It was just
pointed out that it was an inconsistent choice with respect to the
existing code/struct.
> libdwfl/
> 2014-09-10 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Use IS_EXECUTABLE.
> * dwfl_segment_report_module.c (dwfl_segment_report_module): Set
> IS_EXECUTABLE.
> * libdwflP.h (struct Dwfl_Module): New field is_executable.
I like this cleanup (modulo the already existing e32/e64 confusion in the code).
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-10 20:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-10 19:22 [PATCHv2 1/2] Add is_executable to Dwfl_Module Jan Kratochvil
2014-09-10 20:33 Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).