]> git.baikalelectronics.ru Git - kernel.git/commit
fs/binfmt_elf.c: smaller code generation around auxv vector fill
authorAlexey Dobriyan <adobriyan@gmail.com>
Fri, 31 Jan 2020 06:16:50 +0000 (22:16 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 31 Jan 2020 18:30:41 +0000 (10:30 -0800)
commitd0c60506989b78a4e3493c14192852828352b08e
tree7a6ada15ce4f36e1b79ea262461bb06f9f02f880
parent2c573712ffe6b0276b70e91b3961762382baf546
fs/binfmt_elf.c: smaller code generation around auxv vector fill

Filling auxv vector as array with index (auxv[i++] = ...) generates
terrible code.  "saved_auxv" should be reworked because it is the worst
member of mm_struct by size/usefullness ratio but do it later.

Meanwhile help gcc a little with *auxv++ idiom.

Space savings on x86_64:

add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-127 (-127)
Function                                     old     new   delta
load_elf_binary                             5470    5343    -127

Link: http://lkml.kernel.org/r/20191208172301.GD19716@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/binfmt_elf.c