This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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] Fix dynamic linker issue with bind-now


> --- a/elf/Makefile
> +++ b/elf/Makefile
>
> +LDFLAGS-tst-split-dynreloc = -fPIE -Wl,-T,tst-split-dynreloc.lds
> +CFLAGS-tst-split-dynreloc.c = -O0 -DIS_IN_build

shouldn't the source file be compiled w/-fPIE too ?

do you need the IS_IN_build define ?  i'm not seeing it used.

> +tst-split-dynreloc-ENV = LD_BIND_NOW=1

do you need to use the env var ?  pass -Wl,-z,now via LDFLAGS instead ?

> --- /dev/null
> +++ b/elf/tst-split-dynreloc.c
>
> +/* 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.  */

this should be at the top of the file -- move the includes/globals/etc... below

> +int
> +main (void)
> +{
> +  printf ("%s\n", foo);
> +  return 0;
> +}

please use test-skeleton.c.  look at time/tst-ftime.c as a simple example.
-mike

Attachment: signature.asc
Description: Digital signature


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