[PATCH] elf: Reset alignment for each PT_LOAD segment

Jan Beulich jbeulich@suse.com
Wed Aug 3 08:45:11 GMT 2022


On 02.08.2022 01:11, H.J. Lu via Binutils wrote:
> --- a/bfd/elf.c
> +++ b/bfd/elf.c
> @@ -5439,7 +5439,7 @@ assign_file_positions_for_load_sections (bfd *abfd,
>    file_ptr off;  /* Octets.  */
>    bfd_size_type maxpagesize;
>    bfd_size_type p_align;
> -  bool p_align_p = false;
> +  bool p_align_p;

Wouldn't it be helpful / good practice to also move the two variables
into the loop's scope (and then using initializers in favor of
assignments)? Okay preferably with that adjustment.

Jan


More information about the Binutils mailing list