This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] riscv: remove DL_RO_DYN_SECTION


On Tue, 09 Apr 2019 04:25:29 PDT (-0700), david.abdurachmanov@gmail.com wrote:
While working on enabling D front-end (GDC) in GCC we noticed that druntime
was segfaulting if it is linked dynamically. This was tracked to
DL_RO_DYN_SECTION.

DL_RO_DYN_SECTION lines seem to be copied from MIPS file (which is the only
user of it), but the comment doesn't apply to RISC-V. There is no such
requirement in RISC-V ABI.

	* sysdeps/riscv/ldsodefs.h: Remove DL_RO_DYN_SECTION as it is not
	required by RISC-V ABI.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
Cc: jimw@sifive.com
Cc: palmer@sifive.com
Cc: dj@delorie.com
---
 sysdeps/riscv/ldsodefs.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/sysdeps/riscv/ldsodefs.h b/sysdeps/riscv/ldsodefs.h
index f46cf4158e..5ec607e867 100644
--- a/sysdeps/riscv/ldsodefs.h
+++ b/sysdeps/riscv/ldsodefs.h
@@ -38,10 +38,6 @@ struct La_riscv_retval;
 				       struct La_riscv_retval *,	\
 				       const char *);

-/* The RISC-V ABI specifies that the dynamic section has to be read-only.  */
-
-#define DL_RO_DYN_SECTION 1
-
 #include_next <ldsodefs.h>

 #endif

Thanks.  I went ahead and pushed it without a test case so we don't lose the
fix.  I also opened a Bugzilla:

https://sourceware.org/bugzilla/show_bug.cgi?id=24484


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]