Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 948 Bytes

File metadata and controls

27 lines (15 loc) · 948 Bytes

Link attribute

The link attribute of Rust enables us to specify how to link a library. This study examined what differences we can find in the assembly code when specifying setting values dylib, static and raw-dylib for this attribute.

Study results

We found no differences from cases of common functions in calls or implementation.

Details

static

The code shown below calls add() the binary of which is linked by specifying static. Functions from libraries are embedded in the executable file and we found no differences from cases of common functions in calls and implementation.

link_attribute

dylib

We did not conduct a study in Windows because dynamic links support only raw-dylib.

raw-dylib

The code shown below calls add() the binary of which is linked by specifying raw-dylib. The function call uses IAT similarly to a call to a Windows API.

link_attribute