Ticket #4426: pr-164-add-dylib-support.patch

File pr-164-add-dylib-support.patch, 1.3 KB (added by zaytsev, 19 months ago)
  • misc/ext.d/misc.sh.in

    From 53b9b8c1bace05bad1d2ed83442a82e087c7b3b2 Mon Sep 17 00:00:00 2001
    From: Oleg Kharitonov <kh.oleg@gmail.com>
    Date: Mon, 7 Jun 2021 09:13:03 +0200
    Subject: [PATCH] add support for MacOS Mach-O and .dylib files
    
    ---
     misc/ext.d/misc.sh.in | 3 +++
     misc/mc.ext.in        | 8 ++++++++
     2 files changed, 11 insertions(+)
    
    diff --git a/misc/ext.d/misc.sh.in b/misc/ext.d/misc.sh.in
    index 32a5f3f8d6..9490fe51c2 100644
    a b do_view_action() { 
    3535    elf) 
    3636        file "${MC_EXT_FILENAME}" && nm -C "${MC_EXT_FILENAME}" 
    3737        ;; 
     38    dylib) 
     39        file "${MC_EXT_FILENAME}" && nm -n "${MC_EXT_FILENAME}" 
     40        ;; 
    3841    dbf) 
    3942        dbview -b "${MC_EXT_FILENAME}" 
    4043        ;; 
  • misc/mc.ext.in

    diff --git a/misc/mc.ext.in b/misc/mc.ext.in
    index f93d8bf229..1bee924644 100644
    a b regex/i/\.(s|asm)$ 
    431431regex/\.(so|so\.[0-9\.]*)$ 
    432432        View=%view{ascii} @EXTHELPERSDIR@/misc.sh view so 
    433433 
     434# .dylib libraries 
     435regex/\.(dylib|dylib\.[0-9\.]*)$ 
     436        View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dylib 
     437 
    434438# Object 
    435439type/^ELF 
    436440        #Open=%var{PAGER:more} %f 
    437441        View=%view{ascii} @EXTHELPERSDIR@/misc.sh view elf 
    438442 
     443type/^Mach-O 
     444        #Open=%var{PAGER:more} %f 
     445        View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dylib 
     446 
    439447 
    440448### Documentation ### 
    441449