[Nasm-bugs] [Bug 3392380] New: lack of support for PE-COFF symbol type

no-reply at bugzilla-nasm.gorcunov.org no-reply at bugzilla-nasm.gorcunov.org
Wed Feb 1 02:10:05 PST 2017


https://bugzilla.nasm.us/show_bug.cgi?id=3392380

            Bug ID: 3392380
           Summary: lack of support for PE-COFF symbol type
           Product: NASM
           Version: 2.12.xx
          Hardware: PC
                OS: Windows
            Status: OPEN
          Severity: normal
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: appro at openssl.org
                CC: gorcunov at gmail.com, hpa at zytor.com, nasm-bugs at nasm.us

Hi,

Lack of explicit support for assigning PE-COFF symbol types (type field in
coff_Symbol defined in output/pecoff.h) has become an obstacle to profiling and
/guard:cf. Both rely on symbols being marked as functions, i.e. with value 0x20
in the type field, to do their magic. Profiler - to attribute samples to named
subroutines, and /guard:cf - to build tables of approved entry points.

Question would be how to accommodate the support in terms of directives. It
would be tempting to re-use ELF syntax 'global foo:function', *but* it's
actually as interesting to control type even for private non-global
subroutines. Actually, same can be said about ELF, i.e. it's interesting to
designate non-global subroutines as ':function' even in ELF. So that one can
argue that there ought to be *new* directive implemented that would allow to
mark a symbol as function independently of its scope. And that this new
directive would be effective at least in PE-COFF and ELF. For example 'type
foo:function'. Alternatively one can choose to implement global's "antipode"
such as 'private foo:function'...

Cheers.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.


More information about the Nasm-bugs mailing list