diff mbox

bfd/elfnn-aarch64.c: Remove elfNN_aarch64_section_flags

Message ID 1397479501-19851-1-git-send-email-will.newton@linaro.org
State Accepted
Headers show

Commit Message

Will Newton April 14, 2014, 12:45 p.m. UTC
This function seems to be a left over from some previous
functionality that no longer exists - the comment above seems to
make no sense with the current code. Remove the function as it
breaks handling of SystemTap static probe note sections.

bfd/ChangeLog:

2014-04-14  Will Newton  <will.newton@linaro.org>

	* elfnn-aarch64.c (elfNN_aarch64_section_flags): Remove
	function.  (elf_backend_section_flags): Remove define.
---
 bfd/elfnn-aarch64.c | 14 --------------
 1 file changed, 14 deletions(-)

Comments

Will Newton April 22, 2014, 8:51 a.m. UTC | #1
On 14 April 2014 13:45, Will Newton <will.newton@linaro.org> wrote:
> This function seems to be a left over from some previous
> functionality that no longer exists - the comment above seems to
> make no sense with the current code. Remove the function as it
> breaks handling of SystemTap static probe note sections.
>
> bfd/ChangeLog:
>
> 2014-04-14  Will Newton  <will.newton@linaro.org>
>
>         * elfnn-aarch64.c (elfNN_aarch64_section_flags): Remove
>         function.  (elf_backend_section_flags): Remove define.
> ---
>  bfd/elfnn-aarch64.c | 14 --------------
>  1 file changed, 14 deletions(-)

Ping?

> diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
> index 638938d..8094792 100644
> --- a/bfd/elfnn-aarch64.c
> +++ b/bfd/elfnn-aarch64.c
> @@ -5499,17 +5499,6 @@ elfNN_aarch64_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSE
>      }
>  }
>
> -/* Set the right machine number for an AArch64 ELF file.  */
> -
> -static bfd_boolean
> -elfNN_aarch64_section_flags (flagword *flags, const Elf_Internal_Shdr *hdr)
> -{
> -  if (hdr->sh_type == SHT_NOTE)
> -    *flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_CONTENTS;
> -
> -  return TRUE;
> -}
> -
>  /* Handle an AArch64 specific section when reading an object file.  This is
>     called when bfd_section_from_shdr finds a section with an unknown
>     type.  */
> @@ -7286,9 +7275,6 @@ const struct elf_size_info elfNN_aarch64_size_info =
>  #define elf_backend_reloc_type_class           \
>    elfNN_aarch64_reloc_type_class
>
> -#define elf_backend_section_flags              \
> -  elfNN_aarch64_section_flags
> -
>  #define elf_backend_section_from_shdr          \
>    elfNN_aarch64_section_from_shdr
>
> --
> 1.8.1.4
>
Marcus Shawcroft April 22, 2014, 9:36 a.m. UTC | #2
On 14 April 2014 13:45, Will Newton <will.newton@linaro.org> wrote:
> This function seems to be a left over from some previous
> functionality that no longer exists - the comment above seems to
> make no sense with the current code. Remove the function as it
> breaks handling of SystemTap static probe note sections.

OK Thanks /Marcus
diff mbox

Patch

diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 638938d..8094792 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -5499,17 +5499,6 @@  elfNN_aarch64_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSE
     }
 }
 
-/* Set the right machine number for an AArch64 ELF file.  */
-
-static bfd_boolean
-elfNN_aarch64_section_flags (flagword *flags, const Elf_Internal_Shdr *hdr)
-{
-  if (hdr->sh_type == SHT_NOTE)
-    *flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_CONTENTS;
-
-  return TRUE;
-}
-
 /* Handle an AArch64 specific section when reading an object file.  This is
    called when bfd_section_from_shdr finds a section with an unknown
    type.  */
@@ -7286,9 +7275,6 @@  const struct elf_size_info elfNN_aarch64_size_info =
 #define elf_backend_reloc_type_class		\
   elfNN_aarch64_reloc_type_class
 
-#define elf_backend_section_flags		\
-  elfNN_aarch64_section_flags
-
 #define elf_backend_section_from_shdr		\
   elfNN_aarch64_section_from_shdr