Skip to content

Instantly share code, notes, and snippets.

@alexandrumc
Created May 20, 2019 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexandrumc/ce2363b4f344289e7c8386fa6c3d614d to your computer and use it in GitHub Desktop.
Save alexandrumc/ce2363b4f344289e7c8386fa6c3d614d to your computer and use it in GitHub Desktop.
Dlang - Bitfields templates introduces useless GOT
import std.bitmanip;

struct MyStruct
{
    mixin(bitfields!(
        uint, "x", 2,
        uint, "", 6));

}
alexandrucm@Hellada:~$ ~/dlang/dmd/generated/linux/release/64/dmd -c test.d
alexandrucm@Hellada:~$ nm -u test.o 
                 U _D10TypeInfo_h6__initZ
                 U _D15TypeInfo_Struct6__vtblZ
                 U _d_assert_msg
                 U _d_dso_registry
                 U _GLOBAL_OFFSET_TABLE_
                 U __start_minfo
                 U __stop_minfo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment