DynamoRIO / DynamoRIO/dynamorio

create syscall and module libc-independent utils lib for proper NOT_CORE_PROPER sharing, including with tests

Open
#1,409 7 comments 0 reactions 1 assignee Claimed by @derekbruening View on GitHub
Maintainability Migrated Priority-Low Type-Feature
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 18h
Merged PRs (30d)
30

Description

_From [bruen...@google.com](https://code.google.com/u/109494838902877177630/) on April 01, 2014 01:08:58_

suite/tests/tools.c should share DR's raw syscalls: tools.c has a series of
nolibc_*() routines and currently duplicates the asm routine
dynamorio_syscall as nolibc_syscall. We should have a separate .asm file
core/x86/syscall.asm that we can share.

Better to compile + link that one file in both dynamorio and test targets
to avoid code duplication. We could additionally make it a static library
to A) avoid duplicate compilation and B) ensure a clean interface.

While at it, split x86.asm and win32/ files to get rid of
NOT_CORE_PROPER. Xref issue #1079 along with a lot of historic discussion but
I don't think there was any issue filed until now.

Note that drfrontendlib pulls in module_{macho,elf}.c now, plus (the
non-core-only part) of os.c, for os_open(), etc. drinjectlib is similar.

***\* TODO where put isolated utils?

Keep in core/ in general, as everything that goes into the core should be
there.

Candidates:
- core/lib/unix/module_macho.c, core/lib/x86/syscall.asm
- core/unix/lib_module_macho.c, core/lib/x86/lib_syscall.asm
- core/unix/module_macho_lib.c, core/lib/x86/syscall_lib.asm

_Original issue: http://code.google.com/p/dynamorio/issues/detail?id=1409_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.