public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Christian Eggers <ceggers@gmx.de>, binutils@sourceware.org
Cc: amodra@gmail.com
Subject: Re: [PATCH 2/2] Fix several mix up between octets and bytes in ELF program headers
Date: Mon, 02 Mar 2020 14:18:00 -0000	[thread overview]
Message-ID: <bdd71737-fa24-da30-300e-4fd95493aa93@redhat.com> (raw)
In-Reply-To: <20200215193050.22717-3-ceggers@gmx.de>

Hi Christian,

> include/
> 	* bfdlink.h (struct bfd_link_order): Add unit (bytes/octets) to
> 	offset and size members.
> 	* elf/internal.h (struct elf_internal_phdr): likewise for
> 	p_align member.
> 	(struct elf_segment_map): likewise for p_paddr and p_size
> 	members
> 
> bfd/
> 	* bfd.c (bfd_record_phdr): New local "opb". Fix assignment of
> 	"p_paddr" from "at".
> 	* elfcode.h (bfd_from_remote_memory): Add units to several
> 	parameters. New local "opb". Fix usage of p_align. Fix
> 	calculation of "localbase" from "ehdr_vma" and "p_vaddr". Fix
> 	call of target_read_memory().
> 	* elflink.c (elf_fixup_link_order): Fix scope of "s" local. Fix
> 	calculation of "offset" and "output_offset".
> 	(bfd_elf_final_link): New local "opb". Fix calculation of "size"
> 	from "offset" and fix calculation of "end" from "vma+size". Fix
> 	comparison between "sh_addr" and "vma"/"output_offset".
> 	(bfd_elf_discard_info): Fix calculation of "eh_alignment".
> 	* elf-bfd.h (struct elf_link_hash_table): Add unit to tls_size
> 	member.
> 	* elf.c (_bfd_elf_map_sections_to_segments): Add unit (bytes/
> 	octets) to "wrap_to2 and "phdr_size" locals. Fix calculation of
> 	"wrap_to" value. Add unit (bytes) to phdr_lma variable. Fix
> 	assignment of p_paddr from phdr_lma. Fix comparison between "lma
> 	+size" and "next->lma".
> 	(elf_sort_segments): Fix assignment from p_paddr to lma.
> 	(assign_file_positions_for_load_sections): Add unit (bytes) to
> 	local "align". Fix calculation of local "off_adjust". Fix
> 	calculation of local "filehdr_vaddr".
> 	(assign_file_positions_for_non_load_sections): New local "opb".
> 	Fix calculation of "end" from "p_size". Fix comparison between
> 	"vma+SECTION_SIZE()" and "start". Fix calculation of "p_memsz"
> 	from "end" and "p_vaddr".
> 	(rewrite_elf_program_header): Fix comparison between p_vaddr and
> 	vma. Fix assignment to p_paddr from lma. Fix comparison between
> 	p_paddr and lma. Fix assignment to p_paddr from lma.
> 	* merge.c (sec_merge_emit): New local "opb". Convert
> 	"alignment_power" to octets.
> 	(_bfd_add_merge_section): New locals "alignment_power" and
> 	"opb". Fix comparison between "alignment_power" and
> 	"sizeof(align)".
> 	(_bfd_merge_sections): New local "opb". Divide size by opb
> 	before checking align mask.

Approved - please apply - but please fixup the comments first.

Cheers
  Nick

  reply	other threads:[~2020-03-02 14:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200215193050.22717-1-ceggers@gmx.de>
2020-02-15 19:31 ` Christian Eggers
2020-03-02 14:18   ` Nick Clifton [this message]
2020-03-02 20:17     ` [PATCH v2 " Christian Eggers
2020-03-12 18:24       ` Christian Eggers
2020-03-13  5:31         ` Alan Modra
2020-02-15 19:31 ` [PATCH 1/2] " Christian Eggers
2020-03-02 14:17   ` Nick Clifton
2020-03-02 20:11     ` [PATCH v4] " Christian Eggers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bdd71737-fa24-da30-300e-4fd95493aa93@redhat.com \
    --to=nickc@redhat.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=ceggers@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).