[PATCH] Fix dynamic linker issue with bind-now
Petar Jovanovic
petar.jovanovic@rt-rk.com
Tue Dec 16 23:26:00 GMT 2014
ping.
-----Original Message-----
From: Petar Jovanovic [mailto:petar.jovanovic@rt-rk.com]
Sent: Sunday, December 7, 2014 2:04 AM
To: 'Andreas Schwab'
Cc: 'Will Newton'; 'Mike Frysinger'; 'libc-alpha';
'petar.jovanovic@imgtec.com'; 'David Miller'
Subject: RE: [PATCH] Fix dynamic linker issue with bind-now
Hi Andreas,
Thanks for the comments.
> Line break before the operator, not after; tabify indentation.
Done.
> Space before paren.
Done.
>Remove the asterisk column.
Done.
> Braces on new line, line break after return type, space before paren,
missing prototype.
Done, done, done. What is missing a prototype? Printf? If so, that should be
already present in <stdio.h>
I am attaching 3rd updated version of the patch.
Regards,
Petar
-----Original Message-----
From: Andreas Schwab [mailto:schwab@linux-m68k.org]
Sent: Saturday, December 6, 2014 10:38 AM
To: Petar Jovanovic
Cc: 'Will Newton'; 'Mike Frysinger'; 'libc-alpha';
petar.jovanovic@imgtec.com; 'David Miller'
Subject: Re: [PATCH] Fix dynamic linker issue with bind-now
"Petar Jovanovic" <petar.jovanovic@rt-rk.com> writes:
> diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h index
> 7b3e295..d5dea8e 100644
> --- a/elf/dynamic-link.h
> +++ b/elf/dynamic-link.h
> @@ -133,7 +133,9 @@ elf_machine_lazy_rel (struct link_map *map,
>
\
> if (ranges[0].start + ranges[0].size == (start + size))
\
> ranges[0].size -= size;
\
> - if (! ELF_DURING_STARTUP && ((do_lazy) || ranges[0].size == 0))
\
> + if (! ELF_DURING_STARTUP
\
> + && ((do_lazy) || ranges[0].size == 0 ||
\
> + ranges[0].start + ranges[0].size != start))
\
Line break before the operator, not after; tabify indentation.
> diff --git a/elf/tst-split-dynreloc.c b/elf/tst-split-dynreloc.c new
> file mode 100644 index 0000000..32d474f
> --- /dev/null
> +++ b/elf/tst-split-dynreloc.c
> @@ -0,0 +1,27 @@
> +#include <stdio.h>
> +
> +static int __attribute__((section(".bar"))) bar = 0x12345678;
Space before paren.
> +/*
> + * This test will be used to create an executable with a specific
> + * section layout in which .rela.dyn and .rela.plt are not contiguous.
> + *
> + * For x86 case, readelf will report something like:
> + *
> + * ...
> + * [10] .rela.dyn RELA
> + * [11] .bar PROGBITS
> + * [12] .rela.plt RELA
> + * ...
> + *
> + * This is important as this case was not correctly handled by
> +dynamic
> + * linker in the bind-now case, and the second section was never
> + * processed.
> + */
Remove the asterisk column.
> +int main() {
> + printf("%s\n", foo);
> + return 0;
> +}
Braces on new line, line break after return type, space before paren,
missing prototype.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Libc-alpha
mailing list