Skip to content

mangler makes global symbol disappear on linux-ppc

Enviroment: linux-ppc, very fresh software, upcoming gcc 4.2, ghc 6.6. I was trying to build alex software which ended with:

GNU ld version 2.17.50.0.12 20070128
  Supported emulations:
   elf32ppclinux
   elf32ppc
   elf32ppcsim
ghc3729_0.hc:(.text+0x104a): undefined reference to `ParseMonad_alexStartPos_closure'
ghc3729_0.hc:(.text+0x104e): undefined reference to `ParseMonad_alexStartPos_closure'
dist/build/alex/alex-tmp/Info.o: In function `shII_info':
ghc3729_0.hc:(.text+0x106e): undefined reference to `Util_lvl1_closure'
ghc3729_0.hc:(.text+0x1072): undefined reference to `Util_lvl1_closure'
ghc3729_0.hc:(.text+0x107a): undefined reference to `Util_lvl1_closure'
dist/build/alex/alex-tmp/Info.o:(.rodata+0x40): undefined reference to `Util_lvl1_closure'

The problem is that these symbol disappear after going through mangler (so problem is visible only when -O2 is used)

In short the problem is that:

.globl ParseMonad_alexStartPos_closure

disappears.

Edited by Ian Lynagh -
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information