This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Sanity check PIE displacement (like the PIC one)


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Thanks for pinging this patch.

Jan> The current PIC message being printed "all the time" is:
Jan> warning: .dynamic section for "/lib64/librt-2.11.1.so" is not at the expected address
Jan> warning: difference appears to be caused by prelink, adjusting expectations
[...]
Jan> I do not find the current PIC message too useful (moreover without
Jan> any offset printed).  Therefore I am open to removing both the PIC
Jan> (and new PIE) messages when the offset is successfuly considered as
Jan> valid.

I don't find that PIC message particularly useful, either.
Is there some situation where that information is helpful?
If not, then IMO we should remove it.

Jan> 2010-02-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
Jan> 	* solib-svr4.c (LM_ADDR_CHECK): Move variable align to a more inner
Jan> 	block.  New variable minpagesize, set it for ELF ABFDs.  New comment on
Jan> 	PPC-aware condition.  Extend the condition using MINPAGESIZE.
Jan> 	(svr4_exec_displacement): New variable retval.  Sanity check it.

Most of it seems reasonable to me.

Jan> +      warning (_("Using PIE (Position Independent Executable) displacement %s "
Jan> +		 "for \"%s\""),
Jan> +	       paddress (target_gdbarch, retval), bfd_get_filename (exec_bfd));

This is printed unconditionally.  But again, when would it matter to the
user?

If it isn't directly informative, I think we should prefer to be silent.
If it is needed in some obscure situation, maybe we can add an equally
obscure command to print it.

What do you think?

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]