Ticket #12430: 0006-Build-without-linker-warnings-about-missing-entry-sy.patch

File 0006-Build-without-linker-warnings-about-missing-entry-sy.patch, 1.5 KB (added by simonsouth, 8 years ago)

Build without linker warnings about missing entry symbols

  • build/jam/BootRules

    From 6e10587d14669bbb1eef6ed1709dc1f9aeb52d2c Mon Sep 17 00:00:00 2001
    From: Simon South <ssouth@simonsouth.com>
    Date: Wed, 28 Oct 2015 20:10:43 -0400
    Subject: [PATCH] Build without linker warnings about missing entry symbols.
    
    * BootRules: Use -Xlinker option correctly to specify entry point.
    * KernelRules: Build kernel add-ons as shared objects explicitly.
    ---
     build/jam/BootRules   | 2 +-
     build/jam/KernelRules | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/build/jam/BootRules b/build/jam/BootRules
    index e66a6f9..63efcc5 100644
    a b rule BuildMBR binary : source  
    145145actions BuildMBR
    146146{
    147147    $(RM) $(1)
    148     $(HAIKU_CC_$(HAIKU_PACKAGING_ARCH)) $(2) -o $(1) $(MBRFLAGS) -nostdlib -Xlinker --oformat=binary -Xlinker -S -Xlinker -N -Xlinker "-e start" -Xlinker "-Ttext=0x600"
     148    $(HAIKU_CC_$(HAIKU_PACKAGING_ARCH)) $(2) -o $(1) $(MBRFLAGS) -nostdlib -Xlinker --oformat=binary -Xlinker -S -Xlinker -N -Xlinker --entry=start -Xlinker -Ttext=0x600
    149149}
  • build/jam/KernelRules

    diff --git a/build/jam/KernelRules b/build/jam/KernelRules
    index 7fc8b47..11fda4f 100644
    a b rule KernelAddon  
    139139
    140140    # compile and link
    141141    SetupKernel $(sources) : : false ;
    142     local linkFlags = -nostdlib -Xlinker --no-undefined
     142    local linkFlags = -shared -nostdlib -Xlinker --no-undefined
    143143        -Xlinker -soname=\"$(target:G=)\" $(TARGET_KERNEL_ADDON_LINKFLAGS) ;
    144144    LINKFLAGS on $(target) = [ on $(target) return $(LINKFLAGS) ] $(linkFlags) ;
    145145    Main $(target) : $(sources) ;