All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] modpost: assume STT_SPARC_REGISTER is defined
@ 2020-01-04 15:36 ` Masahiro Yamada
  0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2020-01-04 15:36 UTC (permalink / raw)
  To: linux-kbuild
  Cc: David S . Miller, sparclinux, Arnd Bergmann, Ben Colline,
	Masahiro Yamada, Michal Marek, linux-kernel

Commit 8d5290149ee1 ("[SPARC]: Deal with glibc changing macro names in
modpost.c") was more than 14 years ago. STT_SPARC_REGISTER is hopefully
defined in elf.h of recent C libraries.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/mod/modpost.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 6e892c93d104..7edfdb2f4497 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -12,6 +12,7 @@
  */
 
 #define _GNU_SOURCE
+#include <elf.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
@@ -729,12 +730,6 @@ static void handle_symbol(struct module *mod, struct elf_info *info,
 			break;
 		if (ignore_undef_symbol(info, symname))
 			break;
-/* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */
-#if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER)
-/* add compatibility with older glibc */
-#ifndef STT_SPARC_REGISTER
-#define STT_SPARC_REGISTER STT_REGISTER
-#endif
 		if (info->hdr->e_machine == EM_SPARC ||
 		    info->hdr->e_machine == EM_SPARCV9) {
 			/* Ignore register directives. */
@@ -747,7 +742,6 @@ static void handle_symbol(struct module *mod, struct elf_info *info,
 				symname = munged;
 			}
 		}
-#endif
 
 		mod->unres = alloc_symbol(symname,
 					  ELF_ST_BIND(sym->st_info) == STB_WEAK,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] modpost: assume STT_SPARC_REGISTER is defined
@ 2020-01-04 15:36 ` Masahiro Yamada
  0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2020-01-04 15:36 UTC (permalink / raw)
  To: linux-kbuild
  Cc: David S . Miller, sparclinux, Arnd Bergmann, Ben Colline,
	Masahiro Yamada, Michal Marek, linux-kernel

Commit 8d5290149ee1 ("[SPARC]: Deal with glibc changing macro names in
modpost.c") was more than 14 years ago. STT_SPARC_REGISTER is hopefully
defined in elf.h of recent C libraries.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/mod/modpost.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 6e892c93d104..7edfdb2f4497 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -12,6 +12,7 @@
  */
 
 #define _GNU_SOURCE
+#include <elf.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
@@ -729,12 +730,6 @@ static void handle_symbol(struct module *mod, struct elf_info *info,
 			break;
 		if (ignore_undef_symbol(info, symname))
 			break;
-/* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */
-#if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER)
-/* add compatibility with older glibc */
-#ifndef STT_SPARC_REGISTER
-#define STT_SPARC_REGISTER STT_REGISTER
-#endif
 		if (info->hdr->e_machine = EM_SPARC ||
 		    info->hdr->e_machine = EM_SPARCV9) {
 			/* Ignore register directives. */
@@ -747,7 +742,6 @@ static void handle_symbol(struct module *mod, struct elf_info *info,
 				symname = munged;
 			}
 		}
-#endif
 
 		mod->unres = alloc_symbol(symname,
 					  ELF_ST_BIND(sym->st_info) = STB_WEAK,
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] modpost: assume STT_SPARC_REGISTER is defined
  2020-01-04 15:36 ` Masahiro Yamada
@ 2020-01-06 21:33   ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2020-01-06 21:33 UTC (permalink / raw)
  To: masahiroy
  Cc: linux-kbuild, sparclinux, arnd, bcollins, michal.lkml, linux-kernel

From: Masahiro Yamada <masahiroy@kernel.org>
Date: Sun,  5 Jan 2020 00:36:51 +0900

> Commit 8d5290149ee1 ("[SPARC]: Deal with glibc changing macro names in
> modpost.c") was more than 14 years ago. STT_SPARC_REGISTER is hopefully
> defined in elf.h of recent C libraries.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Acked-by: David S. Miller <davem@davemloft.net>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] modpost: assume STT_SPARC_REGISTER is defined
@ 2020-01-06 21:33   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2020-01-06 21:33 UTC (permalink / raw)
  To: masahiroy
  Cc: linux-kbuild, sparclinux, arnd, bcollins, michal.lkml, linux-kernel

From: Masahiro Yamada <masahiroy@kernel.org>
Date: Sun,  5 Jan 2020 00:36:51 +0900

> Commit 8d5290149ee1 ("[SPARC]: Deal with glibc changing macro names in
> modpost.c") was more than 14 years ago. STT_SPARC_REGISTER is hopefully
> defined in elf.h of recent C libraries.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] modpost: assume STT_SPARC_REGISTER is defined
  2020-01-06 21:33   ` David Miller
@ 2020-01-11  7:26     ` Masahiro Yamada
  -1 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2020-01-11  7:26 UTC (permalink / raw)
  To: David Miller
  Cc: Linux Kbuild mailing list, sparclinux, Arnd Bergmann, bcollins,
	Michal Marek, Linux Kernel Mailing List

On Tue, Jan 7, 2020 at 6:33 AM David Miller <davem@redhat.com> wrote:
>
> From: Masahiro Yamada <masahiroy@kernel.org>
> Date: Sun,  5 Jan 2020 00:36:51 +0900
>
> > Commit 8d5290149ee1 ("[SPARC]: Deal with glibc changing macro names in
> > modpost.c") was more than 14 years ago. STT_SPARC_REGISTER is hopefully
> > defined in elf.h of recent C libraries.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
>
> Acked-by: David S. Miller <davem@davemloft.net>
>

Applied to linux-kbuild.


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] modpost: assume STT_SPARC_REGISTER is defined
@ 2020-01-11  7:26     ` Masahiro Yamada
  0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2020-01-11  7:26 UTC (permalink / raw)
  To: David Miller
  Cc: Linux Kbuild mailing list, sparclinux, Arnd Bergmann, bcollins,
	Michal Marek, Linux Kernel Mailing List

On Tue, Jan 7, 2020 at 6:33 AM David Miller <davem@redhat.com> wrote:
>
> From: Masahiro Yamada <masahiroy@kernel.org>
> Date: Sun,  5 Jan 2020 00:36:51 +0900
>
> > Commit 8d5290149ee1 ("[SPARC]: Deal with glibc changing macro names in
> > modpost.c") was more than 14 years ago. STT_SPARC_REGISTER is hopefully
> > defined in elf.h of recent C libraries.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
>
> Acked-by: David S. Miller <davem@davemloft.net>
>

Applied to linux-kbuild.


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-11  7:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-04 15:36 [PATCH] modpost: assume STT_SPARC_REGISTER is defined Masahiro Yamada
2020-01-04 15:36 ` Masahiro Yamada
2020-01-06 21:33 ` David Miller
2020-01-06 21:33   ` David Miller
2020-01-11  7:26   ` Masahiro Yamada
2020-01-11  7:26     ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.