fanquake
commented at 10:00 AM on February 24, 2023:
member
This returns us to pre-Guix behaviour, where the compilers we were using to build releases, were configured with this option.
--enable-initfini-array
Force the use of sections .init_array and .fini_array (instead of .init and .fini) for constructors and destructors. Option --disable-initfini-array has the opposite effect. If neither option is specified, the configure script will try to guess whether the .init_array and .fini_array sections are supported and, if they are, use them.
fanquake added the label DrahtBot Guix build requested on Feb 24, 2023
DrahtBot
commented at 10:00 AM on February 24, 2023:
contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
#25391 (guix: Use LTO to build releases by fanquake)
#24123 (build: Pointer Authentication and Branch Target Identification for aarch64 Linux (Guix) by fanquake)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
DrahtBot
commented at 7:45 PM on February 24, 2023:
contributor
DrahtBot removed the label DrahtBot Guix build requested on Feb 24, 2023
DrahtBot added the label Build system on Feb 24, 2023
fanquake force-pushed on Feb 28, 2023
fanquake marked this as ready for review on Feb 28, 2023
TheCharlatan
commented at 5:35 PM on March 1, 2023:
contributor
I can confirm that this adds relevant .fini_arraysections and gets rid of the .ctors and .dtors sections in the bitcoin x86 _64 linux binaries by comparing the binaries of this PR's HEAD and its HEAD~1.
objdump -h bitcoind on fc733e9 (HEAD) :
bitcoind: file format elf64-x86-64
Sections:
Idx Name Size VMA LMA File off Algn
0 .interp 0000001c0000000000000350000000000000035000000350 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
...
22 .init_array 000005980000000000e5dfa00000000000e5dfa000e5cfa0 2**3
CONTENTS, ALLOC, LOAD, DATA
23 .fini_array 000000080000000000e5e5380000000000e5e53800e5d538 2**3
CONTENTS, ALLOC, LOAD, DATA
24 .data.rel.ro 0001c6f80000000000e5e5400000000000e5e54000e5d540 2**5
CONTENTS, ALLOC, LOAD, DATA
25 .dynamic 000002500000000000e7ac380000000000e7ac3800e79c38 2**3
CONTENTS, ALLOC, LOAD, DATA
26 .got 000011680000000000e7ae880000000000e7ae8800e79e88 2**3
CONTENTS, ALLOC, LOAD, DATA
27 .data 000038300000000000e7c0000000000000e7c00000e7b000 2**5
CONTENTS, ALLOC, LOAD, DATA
28 .bss 000103d80000000000e7f8400000000000e7f84000e7e830 2**5
ALLOC
29 .comment 000000120000000000000000000000000000000000e7e830 2**0
CONTENTS, READONLY
30 .note.stapsdt 000004fc0000000000000000000000000000000000e7e844 2**2
CONTENTS, READONLY
31 .gnu_debuglink 000000140000000000000000000000000000000000e7ed40 2**2
CONTENTS, READONLY
objdump -h bitcoind on 4398cfb2 (HEAD~1):
bitcoind: file format elf64-x86-64
Sections:
Idx Name Size VMA LMA File off Algn
0 .interp 0000001c0000000000000350000000000000035000000350 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
...
22 .init_array 000005900000000000e5dfb00000000000e5dfb000e5cfb0 2**3
CONTENTS, ALLOC, LOAD, DATA
23 .ctors 000000100000000000e5e5400000000000e5e54000e5d540 2**3
CONTENTS, ALLOC, LOAD, DATA
24 .dtors 000000100000000000e5e5500000000000e5e55000e5d550 2**3
CONTENTS, ALLOC, LOAD, DATA
25 .data.rel.ro 0001c6f80000000000e5e5600000000000e5e56000e5d560 2**5
CONTENTS, ALLOC, LOAD, DATA
26 .dynamic 000002300000000000e7ac580000000000e7ac5800e79c58 2**3
CONTENTS, ALLOC, LOAD, DATA
27 .got 000011680000000000e7ae880000000000e7ae8800e79e88 2**3
CONTENTS, ALLOC, LOAD, DATA
28 .data 000038300000000000e7c0000000000000e7c00000e7b000 2**5
CONTENTS, ALLOC, LOAD, DATA
29 .bss 000103d80000000000e7f8400000000000e7f84000e7e830 2**5
ALLOC
30 .comment 000000120000000000000000000000000000000000e7e830 2**0
CONTENTS, READONLY
31 .note.stapsdt 000004fc0000000000000000000000000000000000e7e844 2**2
CONTENTS, READONLY
32 .gnu_debuglink 000000140000000000000000000000000000000000e7ed40 2**2
CONTENTS, READONLY
EDIT: I am also seeing around ~0.1kb binary size reduction :P
guix: pass --enable-initfini-array to release GCC
This returns us to pre-Guix behaviour, where the compilers we were using
to build releases, were configured with this option.
127c637cf0
fanquake force-pushed on Mar 1, 2023
TheCharlatan
commented at 10:02 PM on March 1, 2023:
contributor
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-04-26 06:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me