Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 29 Nov 2015 17:47:24 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: [PATCH 1/2] init_array/fini_array cleanup

* Szabolcs Nagy <nsz@...t70.net> [2015-11-29 16:30:51 +0100]:
> -extern void (*const __init_array_start)(void), (*const __init_array_end)(void);
> +extern void (*const __init_array_start[])(void), (*const __init_array_end[])(void);

Alexander Monakov pointed out that the compiler may
consider arrays to be separate objects and then
f<__init_array_end would be ub.

attached an updated version, the same code is generated
on x86_64 as before, except there is no xor %eax,%eax
now before the call (because there is prototype).

View attachment "0001-cleaner-init-fini-array-handling.patch" of type "text/x-diff" (1517 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.