From cfd28b671abdb27ea26751e8133dd5c7d60eae3d Mon Sep 17 00:00:00 2001 From: Kees van Reeuwijk Date: Thu, 29 Apr 2010 20:12:56 +0000 Subject: [PATCH] Put the munmap and munmap_text trampolines in a separate .S file, so that they can be overridden independenly of mmap. --- lib/libc/syscall/Makefile.inc | 1 + lib/libc/syscall/mmap.S | 10 ---------- lib/libc/syscall/munmap.S | 12 ++++++++++++ 3 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 lib/libc/syscall/munmap.S diff --git a/lib/libc/syscall/Makefile.inc b/lib/libc/syscall/Makefile.inc index f4993c4f1..18410494a 100644 --- a/lib/libc/syscall/Makefile.inc +++ b/lib/libc/syscall/Makefile.inc @@ -69,6 +69,7 @@ SRCS+= \ mkfifo.S \ mknod.S \ mmap.S \ + munmap.S \ vm_getphys.S \ vm_getrefcount.S \ vm_remap.S \ diff --git a/lib/libc/syscall/mmap.S b/lib/libc/syscall/mmap.S index 0ea709587..6a10fe4b5 100644 --- a/lib/libc/syscall/mmap.S +++ b/lib/libc/syscall/mmap.S @@ -1,17 +1,7 @@ .text .extern __mmap .globl _mmap -.extern __munmap -.globl _munmap -.extern __munmap_text -.globl _munmap_text .balign 2 _mmap: jmp __mmap - -_munmap: - jmp __munmap - -_munmap_text: - jmp __munmap_text diff --git a/lib/libc/syscall/munmap.S b/lib/libc/syscall/munmap.S new file mode 100644 index 000000000..c7da555f0 --- /dev/null +++ b/lib/libc/syscall/munmap.S @@ -0,0 +1,12 @@ +.text +.extern __munmap +.globl _munmap +.extern __munmap_text +.globl _munmap_text +.balign 2 + +_munmap: + jmp __munmap + +_munmap_text: + jmp __munmap_text -- 2.44.0