* [PATCH] elf: Add missing assignment for octets per byte
@ 2020-02-16 19:16 Christian Eggers
2020-03-02 16:31 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Christian Eggers @ 2020-02-16 19:16 UTC (permalink / raw)
To: binutils; +Cc: Christian Eggers
When setting SEC_ELF_OCTETS, also opb should be set to 1. Shouldn't make
much difference in this case as sh_addr, p_paddr and p_vaddr are usually
0 for .debug sections. Just for completeness.
* elf.c (_bfd_elf_make_section_from_shdr): Assign opb=1 when
setting SEC_ELF_OCTETS.
Signed-off-by: Christian Eggers <ceggers@gmx.de>
---
bfd/elf.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/bfd/elf.c b/bfd/elf.c
index 4ceb28f9ada..10db091856a 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1101,7 +1101,10 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
if (strncmp (name, ".debug", 6) == 0
|| strncmp (name, ".gnu.linkonce.wi.", 17) == 0
|| strncmp (name, ".zdebug", 7) == 0)
- flags |= SEC_DEBUGGING | SEC_ELF_OCTETS;
+ {
+ flags |= SEC_DEBUGGING | SEC_ELF_OCTETS;
+ opb = 1;
+ }
else if (strncmp (name, GNU_BUILD_ATTRS_SECTION_NAME, 21) == 0
|| strncmp (name, ".note.gnu", 9) == 0)
{
--
2.16.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] elf: Add missing assignment for octets per byte
2020-02-16 19:16 [PATCH] elf: Add missing assignment for octets per byte Christian Eggers
@ 2020-03-02 16:31 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2020-03-02 16:31 UTC (permalink / raw)
To: Christian Eggers, binutils
Hi Christian,
> * elf.c (_bfd_elf_make_section_from_shdr): Assign opb=1 when
> setting SEC_ELF_OCTETS.
Approved, please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-02 16:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-16 19:16 [PATCH] elf: Add missing assignment for octets per byte Christian Eggers
2020-03-02 16:31 ` Nick Clifton
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).