Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • e32b42b
  • /
  • test
  • /
  • MC
  • /
  • COFF
  • /
  • weak.s
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:0f99313c9c034b98d30a958fb572c0e81d0f63bd
directory badge
swh:1:dir:5042ae99ac69f56c8ec481a285713add7a854fe9

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
weak.s
// This tests that default-null weak symbols (a GNU extension) are created
// properly via the .weak directive.

// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 < %s | coff-dump.py | FileCheck %s

    .def    _main;
    .scl    2;
    .type   32;
    .endef
    .text
    .globl  _main
    .align  16, 0x90
_main:                                  # @main
# BB#0:                                 # %entry
    subl    $4, %esp
    movl    $_test_weak, %eax
    testl   %eax, %eax
    je      LBB0_2
# BB#1:                                 # %if.then
    calll   _test_weak
    movl    $1, %eax
    addl    $4, %esp
    ret
LBB0_2:                                 # %return
    xorl    %eax, %eax
    addl    $4, %esp
    ret

    .weak   _test_weak

// CHECK: Symbols = [

// CHECK:      Name               = _test_weak
// CHECK-NEXT: Value              = 0
// CHECK-NEXT: SectionNumber      = 0
// CHECK-NEXT: SimpleType         = IMAGE_SYM_TYPE_NULL (0)
// CHECK-NEXT: ComplexType        = IMAGE_SYM_DTYPE_NULL (0)
// CHECK-NEXT: StorageClass       = IMAGE_SYM_CLASS_WEAK_EXTERNAL (105)
// CHECK-NEXT: NumberOfAuxSymbols = 1
// CHECK-NEXT: AuxillaryData      =
// CHECK-NEXT: 05 00 00 00 02 00 00 00 - 00 00 00 00 00 00 00 00 |................|
// CHECK-NEXT: 00 00                                             |..|

// CHECK:      Name               = .weak._test_weak.default
// CHECK-NEXT: Value              = 0
// CHECK-NEXT: SectionNumber      = 65535
// CHECK-NEXT: SimpleType         = IMAGE_SYM_TYPE_NULL (0)
// CHECK-NEXT: ComplexType        = IMAGE_SYM_DTYPE_NULL (0)
// CHECK-NEXT: StorageClass       = IMAGE_SYM_CLASS_EXTERNAL (2)
// CHECK-NEXT: NumberOfAuxSymbols = 0
// CHECK-NEXT: AuxillaryData      =

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API