|
Message-ID: <alpine.LNX.2.20.13.2001191730310.7204@monopod.intra.ispras.ru> Date: Sun, 19 Jan 2020 17:46:15 +0300 (MSK) From: Alexander Monakov <amonakov@...ras.ru> To: musl@...ts.openwall.com Subject: Re: Minor style patch to exit.c On Sun, 19 Jan 2020, Alexander Cherepanov wrote: > Couldn't _start defined as an array? Then separate values could be accessed > simply as elements of this array. And casts to integers could be limited to > calculating the number of elements, the terminating value or something. Yeah, I think usually such linker-provided symbols are declared as extern arrays. I'm surprised that isn't the case in musl. I don't think declaring them as arrays helps with making casts pedantically suitable for calculating number of elements though - as you said, any bijection between intptr_t and pointers would be a valid implementation of a cast, you're not guaranteed that (intptr_t)&a[i] == (intptr_t)a + i * sizeof *a. Alexander
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.