This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 06/12] elf: Enable relro for static build
* Adhemerval Zanella:
> +static volatile int val __attribute__ ((section (".data.rel.ro")));
I would prefer something that needs an actual run-time relocation
because I doubt that all targets use .data.rel.ro.
> +int do_test (void)
> +{
> + struct support_capture_subprocess result
> + = support_capture_subprocess (callback, NULL);
> + support_capture_subprocess_check (&result, "tst-relro", -SIGSEGV,
> + sc_allow_stdout);
> + return 0;
> +}
My test <https://sourceware.org/ml/libc-alpha/2019-10/msg00130.html>
used a new support/ helper for that.
Thanks,
Florian