Re: [PATCH] constify static arrays of strings

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On Thu, 30 Sep 2021, Mike Frysinger wrote:

> By marking these static & the array itself as const, the data is moved

> -	static const char *rhosts_files[] = {".shosts", ".rhosts", NULL};
> +	static const char * const rhosts_files[] = {".shosts", ".rhosts", NULL};

Is this really true nowadays? I thought with PIC/PIE, these are
relocations and therefore neither constant nor shared/shareable,
at least for some architectures (i386?).

But it’s nevertheless a good idea, of course.

bye,
//mirabilos
-- 
Sometimes they [people] care too much: pretty printers [and syntax highligh-
ting, d.A.] mechanically produce pretty output that accentuates irrelevant
detail in the program, which is as sensible as putting all the prepositions
in English text in bold font.	-- Rob Pike in "Notes on Programming in C"
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev




[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux