This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: vdso handling
- From: Pedro Alves <palves at redhat dot com>
- To: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>, Mark Wielaard <mjw at redhat dot com>, Cary Coutant <ccoutant at google dot com>, Doug Evans <dje at google dot com>, gdb-patches at sourceware dot org, binutils at sourceware dot org
- Date: Tue, 01 Apr 2014 14:46:38 +0100
- Subject: Re: vdso handling
- Authentication-results: sourceware.org; auth=none
- References: <5321C8FA dot 40708 at gmail dot com> <5321CE1A dot 20509 at redhat dot com> <20140313235347 dot GD3384 at bubble dot grove dot modra dot org> <A78C989F6D9628469189715575E55B230AAB6B17 at IRSMSX103 dot ger dot corp dot intel dot com> <20140318230939 dot GA9145 at bubble dot grove dot modra dot org> <5329879C dot 6070805 at redhat dot com> <20140320013305 dot GA13347 at bubble dot grove dot modra dot org> <532C5F60 dot 80700 at redhat dot com> <20140328061321 dot GU18201 at bubble dot grove dot modra dot org> <53357B30 dot 6040006 at redhat dot com> <20140328230037 dot GW18201 at bubble dot grove dot modra dot org>
On 03/28/2014 11:00 PM, Alan Modra wrote:
> I believe the intent of rounding to a page was to pick up the file
> and program headers at the start of a file and section headers at the
> end, so let's do just that. On top of my last patch:
Agreed. This works for me. Thanks!
> - if (i_phdrs[i].p_align > 1)
> + /* Extend the beginning of the first pt_load to cover file
> + header and program headers. */
> + if (first_phdr == &i_phdrs[i])
Minor nit: Perhaps the comment could say "first pt_load
if it covers offset 0"? The computation below confused me a little
until I scrolled up and realized that first_phdr is only set if
the first segment covers offset 0, not whatever the first segment
is. (I'd even consider renaming it to zero_phdr or
zero_offset_phdr, but with the comment I'd already be
super happy).
On the GDB patch, sorry for not noticing earlier, but:
> +static int
> +find_vdso_size (CORE_ADDR vaddr, unsigned long size,
> + int read ATTRIBUTE_UNUSED, int write ATTRIBUTE_UNUSED,
> + int exec ATTRIBUTE_UNUSED, int modified ATTRIBUTE_UNUSED,
> + void *data)
> +{
Please don't use ATTRIBUTE_UNUSED under gdb/, it'd be flagged by the
ARI as a regression:
gdb/contrib/gdb_ari.sh:
BEGIN { doc["ATTRIBUTE_UNUSED"] = "\
Do not use ATTRIBUTE_UNUSED, do not bother (GDB is compiled with -Werror and, \
consequently, is not able to tolerate false warnings. Since -Wunused-param \
produces such warnings, neither that warning flag nor ATTRIBUTE_UNUSED \
are used by GDB"
category["ATTRIBUTE_UNUSED"] = ari_regression
}
/(^|[^_[:alnum:]])ATTRIBUTE_UNUSED([^_[:alnum:]]|$)/ {
fail("ATTRIBUTE_UNUSED")
}
--
Pedro Alves