diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2025-02-03 12:01:28 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2025-02-04 13:01:24 +0800 |
commit | 13bc088de035ca92508545c3a71341d08102ed8d (patch) | |
tree | d05e1797c059bead008e3c2729f87490b8d63d73 | |
parent | 0bd340d6704eaeaf2ecb517bef4761a691af1cc0 (diff) | |
download | binutils-13bc088de035ca92508545c3a71341d08102ed8d.zip binutils-13bc088de035ca92508545c3a71341d08102ed8d.tar.gz binutils-13bc088de035ca92508545c3a71341d08102ed8d.tar.bz2 |
elflink.c: Replace bed->dynamic_sec_flags with flags
Since at the function entry, there is
flags = bed->dynamic_sec_flags;
we can replace bed->dynamic_sec_flags with flags.
* elflink.c (_bfd_elf_create_got_section): Replace
bed->dynamic_sec_flags with flags.
(_bfd_elf_link_create_dynamic_sections): Likewise.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
-rw-r--r-- | bfd/elflink.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 309b4d7..a31e409 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -198,8 +198,7 @@ _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, (bed->rela_plts_and_copies_p ? ".rela.got" : ".rel.got"), - (bed->dynamic_sec_flags - | SEC_READONLY)); + flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) return false; @@ -397,8 +396,7 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (info->enable_dt_relr) { s = bfd_make_section_anyway_with_flags (abfd, ".relr.dyn", - (bed->dynamic_sec_flags - | SEC_READONLY)); + flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) return false; |