[v5,20/22] elf: Move LAV_CURRENT to link_lavcurrent.h

Message ID 20211109183347.2943786-21-adhemerval.zanella@linaro.org
State Superseded
Headers
Series Multiple rtld-audit fixes |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Adhemerval Zanella Nov. 9, 2021, 6:33 p.m. UTC
  No functional change.
---
 bits/link_lavcurrent.h | 25 +++++++++++++++++++++++++
 elf/Makefile           |  2 +-
 elf/link.h             |  2 +-
 3 files changed, 27 insertions(+), 2 deletions(-)
 create mode 100644 bits/link_lavcurrent.h
  

Comments

Florian Weimer Nov. 11, 2021, 5:42 p.m. UTC | #1
* Adhemerval Zanella:

> No functional change.
> ---
>  bits/link_lavcurrent.h | 25 +++++++++++++++++++++++++
>  elf/Makefile           |  2 +-
>  elf/link.h             |  2 +-
>  3 files changed, 27 insertions(+), 2 deletions(-)
>  create mode 100644 bits/link_lavcurrent.h

Looks okay.  I think this can go in right now.

Thanks,
Florian
  
Adhemerval Zanella Nov. 15, 2021, 2:21 p.m. UTC | #2
On 11/11/2021 14:42, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> No functional change.
>> ---
>>  bits/link_lavcurrent.h | 25 +++++++++++++++++++++++++
>>  elf/Makefile           |  2 +-
>>  elf/link.h             |  2 +-
>>  3 files changed, 27 insertions(+), 2 deletions(-)
>>  create mode 100644 bits/link_lavcurrent.h
> 
> Looks okay.  I think this can go in right now.

Alright, I will push this before send a newer version.
  

Patch

diff --git a/bits/link_lavcurrent.h b/bits/link_lavcurrent.h
new file mode 100644
index 0000000000..44fbea1e80
--- /dev/null
+++ b/bits/link_lavcurrent.h
@@ -0,0 +1,25 @@ 
+/* Data structure for communication from the run-time dynamic linker for
+   loaded ELF shared objects.  LAV_CURRENT definition.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _LINK_H
+# error "Never include <bits/link_lavcurrent.h> directly; use <link.h> instead."
+#endif
+
+/* Version numbers for la_version handshake interface.  */
+#define LAV_CURRENT	1
diff --git a/elf/Makefile b/elf/Makefile
index 3172219386..1a7e851dfa 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -21,7 +21,7 @@  subdir		:= elf
 
 include ../Makeconfig
 
-headers		= elf.h bits/elfclass.h link.h bits/link.h
+headers		= elf.h bits/elfclass.h link.h bits/link.h bits/link_lavcurrent.h
 routines	= $(all-dl-routines) dl-support dl-iteratephdr \
 		  dl-addr dl-addr-obj enbl-secure dl-profstub \
 		  dl-origin dl-libc dl-sym dl-sysdep dl-error \
diff --git a/elf/link.h b/elf/link.h
index 67ab2495cc..debbcd2fcb 100644
--- a/elf/link.h
+++ b/elf/link.h
@@ -113,7 +113,7 @@  struct link_map
 #ifdef __USE_GNU
 
 /* Version numbers for la_version handshake interface.  */
-#define LAV_CURRENT	1
+#include <bits/link_lavcurrent.h>
 
 /* Activity types signaled through la_activity.  */
 enum