[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][lintian/lintian][master] Mention StaticLinking wiki page for go programs



Title: GitLab

Nilesh Patra pushed to branch master at lintian / lintian

Commits:

  • f86769c5
    by Emanuele Rocca at 2025-09-16T12:18:41+02:00
    Mention StaticLinking wiki page for go programs
    
    The statically-linked-binary check explicitly excludes golang programs. At
    first glance it may seem that binaries produced by the go compiler are actually
    linked dynamically, but that is only partially true (only libc is in fact
    dynamically linked), and only for programs not using any cgo. Point to the wiki
    page explaining this.
    

1 changed file:

Changes:

  • lib/Lintian/Check/Binaries/Static.pm
    ... ... @@ -91,14 +91,14 @@ sub visit_installed_files {
    91 91
     
    
    92 92
         my $is_shared = $item->file_type =~ m/(shared object|pie executable)/;
    
    93 93
     
    
    94
    -    # Some exceptions: files in /boot, /usr/lib/debug/*,
    
    95
    -    # named *-static or *.static, or *-static as
    
    96
    -    # package-name.
    
    97
    -    # Binaries built by the Go compiler are statically
    
    98
    -    # linked by default.
    
    99
    -    # klibc binaries appear to be static.
    
    100
    -    # Location of debugging symbols.
    
    101
    -    # ldconfig must be static.
    
    94
    +   # Some exceptions: files in /boot, /usr/lib/debug/*,
    
    95
    +   # named *-static or *.static, or *-static as
    
    96
    +   # package-name.
    
    97
    +   # Binaries built by the Go compiler not using any cgo are statically linked:
    
    98
    +   # https://wiki.debian.org/StaticLinking#Go
    
    99
    +   # klibc binaries appear to be static.
    
    100
    +   # Location of debugging symbols.
    
    101
    +   # ldconfig must be static.
    
    102 102
         $self->pointed_hint('statically-linked-binary', $item->pointer)
    
    103 103
           if !$is_shared
    
    104 104
           && !exists $item->elf->{NEEDED}
    


  • Reply to: