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() { |
35 | 35 | elf) |
36 | 36 | file "${MC_EXT_FILENAME}" && nm -C "${MC_EXT_FILENAME}" |
37 | 37 | ;; |
| 38 | dylib) |
| 39 | file "${MC_EXT_FILENAME}" && nm -n "${MC_EXT_FILENAME}" |
| 40 | ;; |
38 | 41 | dbf) |
39 | 42 | dbview -b "${MC_EXT_FILENAME}" |
40 | 43 | ;; |
diff --git a/misc/mc.ext.in b/misc/mc.ext.in
index f93d8bf229..1bee924644 100644
a
|
b
|
regex/i/\.(s|asm)$ |
431 | 431 | regex/\.(so|so\.[0-9\.]*)$ |
432 | 432 | View=%view{ascii} @EXTHELPERSDIR@/misc.sh view so |
433 | 433 | |
| 434 | # .dylib libraries |
| 435 | regex/\.(dylib|dylib\.[0-9\.]*)$ |
| 436 | View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dylib |
| 437 | |
434 | 438 | # Object |
435 | 439 | type/^ELF |
436 | 440 | #Open=%var{PAGER:more} %f |
437 | 441 | View=%view{ascii} @EXTHELPERSDIR@/misc.sh view elf |
438 | 442 | |
| 443 | type/^Mach-O |
| 444 | #Open=%var{PAGER:more} %f |
| 445 | View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dylib |
| 446 | |
439 | 447 | |
440 | 448 | ### Documentation ### |
441 | 449 | |