diff mbox

[3/3] ldso: fix compile error for bfin non-mmu

Message ID 1409474640-4870-3-git-send-email-wbx@openadk.org
State Rejected
Commit 0cc7d65f3d412f0e547e5384341081aa749e913f
Headers show

Commit Message

Waldemar Brodkorb Aug. 31, 2014, 8:44 a.m. UTC
When compiling for bfin non-mmu, you get following error:
ldso/ldso/dl-elf.c:731:18: error: '_dl_debug_file' undeclared (first use in this function)
_dl_debug_file is only available when __SUPPORT_LD_DEBUG__ is
defined.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
 ldso/ldso/dl-elf.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Bernhard Reutner-Fischer Sept. 4, 2014, 11:28 a.m. UTC | #1
On 31 August 2014 10:44, Waldemar Brodkorb <wbx@openadk.org> wrote:
> When compiling for bfin non-mmu, you get following error:
> ldso/ldso/dl-elf.c:731:18: error: '_dl_debug_file' undeclared (first use in this function)
> _dl_debug_file is only available when __SUPPORT_LD_DEBUG__ is
> defined.

I think this should use the fd, this is not debugging-output but a hard error.
b212e3804fb155cb418852dd70abad9a3d2354cc
thanks,
diff mbox

Patch

diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c
index 1b06bc1..4c42fbc 100644
--- a/ldso/ldso/dl-elf.c
+++ b/ldso/ldso/dl-elf.c
@@ -728,8 +728,10 @@  struct elf_resolve *_dl_load_elf_shared_library(unsigned rflags,
 				void *new_addr;
 				new_addr = map_writeable (infile, ppnt, piclib, flags, libaddr);
 				if (!new_addr) {
+#ifdef __SUPPORT_LD_DEBUG__
 					_dl_dprintf(_dl_debug_file, "Can't modify %s's text section.",
 						    libname);
+#endif
 					_dl_exit(1);
 				}
 				DL_UPDATE_LOADADDR_HDR(lib_loadaddr,