[PATCH] gold: Add --pack-dyn-relocs=relr for arm/aarch64/x86-64 [PR 28601]
Cary Coutant
ccoutant@gmail.com
Thu Nov 25 01:00:10 GMT 2021
> void
> set_current_data_size_for_child(off_t data_size)
> {
> - gold_assert(!this->is_data_size_valid_);
> this->data_size_ = data_size;
> }
Why was it necessary to remove this assert? In each relaxation pass,
reset_address_and_file_offset() should have been called, which would
set this flag to false. It shouldn't get set again until the size is
finalized, so I think you may be computing the section size too late,
which could lead to other problems.
Also, beware of spaces before parens in function calls. The C++ style
is to have no space.
I'm still reviewing the patch, and trying to decide whether adding a
relaxation pass to x86 is really necessary.
-cary
More information about the Binutils
mailing list