#1682 External references unresolved by Linker

linker (61)

Dear developers, the linker could not resolve the external symbol, "__gptrput.
SDCC: mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.9.0 # 5416 (Mar 22 2009) (MingW32)
> Sdcc func.c
> Asx8051 funca.asm startup program ....
> Aslink-f link.lk

in place of LCALL __gptrput , we get a result LCALL 0000 in file. hex

following files for evaluation.



  • Raimundo Abreu

    Raimundo Abreu - 2010-09-07

    in zip format , four files

  • Maarten Brock

    Maarten Brock - 2012-01-24
    • labels: --> linker
    • milestone: --> unreproducable
    • assigned_to: nobody --> maartenbrock
    • status: open --> pending-works-for-me
  • Maarten Brock

    Maarten Brock - 2012-01-24


    I do not completely understand your bug report. Did you get any error message about unresolved externals? Or is the absence of such a message the bug?

    Did you really install sdcc in C:\Arquivos de programas\SDCC ? Or was it somehwere else?

    Your first line should give 'error 74: function 'main' undefined' since you did not use the -c option.

    I also don't get what 'startup program ....' is doing on the Asx8051 invocation line. What was your intention with that and didn't you get any errors from this? And without -o option you will not get a .rel file.

    When I use
    > sdcc -c func.c
    > asx8051 -lo funca.asm
    > aslink -f link.lk
    Where link.lk was modified to use -k C:\Program Files\SDCC\bin\..\lib\small because that is where I have sdcc installed, then I get no errors and the address of gptrput in the hex file is ok.

    So I cannot reproduce this bug when the link.lk file is correct for my system. I therefor set this item pending and it will auto-close in a few weeks.


  • Philipp Klaus Krause

    • Category: --> sdld
  • Maarten Brock

    Maarten Brock - 2013-07-16
    • status: pending-works-for-me --> closed-works-for-me

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks