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 1/2] Fix several mix up between octets and bytes in ELF program headers
Date: Mon, 02 Mar 2020 14:17:00 -0000	[thread overview]
Message-ID: <1b834989-fc85-17ed-310c-10563a6ea07e@redhat.com> (raw)
In-Reply-To: <20200215193050.22717-2-ceggers@gmx.de>

Hi Christian,

> include/
> 	* elf/internal.h (struct elf_internal_phdr): Add unit (octets)
> 	to several member field comments.
> 	(Elf_Internal_Shdr): likewise.
> 
> bfd/
> 	* elf.c (_bfd_elf_make_section_from_shdr): Introduce new temp
> 	opb. Divide Elf_Internal_Shdr::sh_addr by opb when setting
> 	section LMA/VMA.
> 	(_bfd_elf_make_section_from_phdr): Similarly.
> 	(elf_fake_sections): Fix calculation of
> 	Elf_Internal_shdr::sh_addr from section VMA.
> 	(_bfd_elf_map_sections_to_segments): Fix mixup between octets
> 	and bytes.
> 	(assign_file_positions_for_load_sections): Fix calculations of
> 	Elf_Internal_shdr::p_vaddr and p_paddr from section LMA/VMA. Fix
> 	comparison between program header address and section LMA.
> 	(assign_file_positions_for_non_load_sections): Likewise.
> 	(rewrite_elf_program_header): Likewise. Introduce new temp opb.
> 	(IS_CONTAINED_BY_VMA): Add parameter opb.
> 	(IS_CONTAINED_BY_LMA,IS_SECTION_IN_INPUT_SEGMENT,
> 	INCLUDE_SECTION_IN_SEGMENT): Likewise.
> 	(copy_elf_program_header): Update call to
> 	ELF_SECTION_IN_SEGMENT(). Fix calculations of p_addr_valid and
> 	p_vaddr_offset.
> 	* elflink.c (elf_link_add_object_symbols): Multiply section VMA
> 	with octets per byte when comparing against p_vaddr.
> 
> ld/
> 	* ldexp.c (fold_name): Return SIZEOF_HEADERS in bytes.

Approved - please apply - but with one change:
 
> +	      bfd_vma p_start = p->p_paddr;                /* octets */

Please could yoy change the format of these comments so that they follow
the GNU Coding Standard guidelines ?  Ie, please start with a capital
letter and end with a period:

  /* Octets.  */

And similarly for you /* bytes */ comments - they should be /* Bytes.  */

Thanks.

 

  reply	other threads:[~2020-03-02 14:17 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 ` [PATCH 2/2] " Christian Eggers
2020-03-02 14:18   ` Nick Clifton
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 [this message]
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=1b834989-fc85-17ed-310c-10563a6ea07e@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).