diff options
author | Jan Beulich <jbeulich@suse.com> | 2023-12-15 12:41:21 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2023-12-15 12:41:21 +0100 |
commit | f27110955454028a389d38a7c5017e36b625bdb5 (patch) | |
tree | 4a068b70f43c9a8220a9139aabb1629a81fedf16 /gas/config/obj-elf.c | |
parent | d4064aad87f47dac73f9ae2b2c24bae8bb5feabe (diff) | |
download | gdb-f27110955454028a389d38a7c5017e36b625bdb5.zip gdb-f27110955454028a389d38a7c5017e36b625bdb5.tar.gz gdb-f27110955454028a389d38a7c5017e36b625bdb5.tar.bz2 |
ELF: drop "push" parameter from obj_elf_change_section()
No caller outside of obj-elf.c cares about the parameter - drop it by
introducing an obj-elf.c-internal wrapper.
While adding the new function parameter, take the opportunity and change
the adjacent boolean one to "bool".
Diffstat (limited to 'gas/config/obj-elf.c')
-rw-r--r-- | gas/config/obj-elf.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index eaf2d6a..23eff51 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -540,14 +540,14 @@ get_section_by_match (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *inf) other possibilities, but I don't know what they are. In any case, BFD doesn't really let us set the section type. */ -void -obj_elf_change_section (const char *name, - unsigned int type, - bfd_vma attr, - int entsize, - struct elf_section_match *match_p, - int linkonce, - int push) +static void +change_section (const char *name, + unsigned int type, + bfd_vma attr, + int entsize, + struct elf_section_match *match_p, + bool linkonce, + bool push) { asection *old_sec; segT sec; @@ -820,6 +820,17 @@ obj_elf_change_section (const char *name, #endif } +void +obj_elf_change_section (const char *name, + unsigned int type, + bfd_vma attr, + int entsize, + struct elf_section_match *match_p, + bool linkonce) +{ + change_section (name, type, attr, entsize, match_p, linkonce, false); +} + static bfd_vma obj_elf_parse_section_letters (char *str, size_t len, bool *is_clone, int *inherit, bfd_vma *gnu_attr) @@ -1488,8 +1499,7 @@ obj_elf_section (int push) } } - obj_elf_change_section (name, type, attr, entsize, &match, linkonce, - push); + change_section (name, type, attr, entsize, &match, linkonce, push); if (linked_to_section_index != -1UL) { |