Skip to content

Commit 95cb63e

Browse files
committed
Add underscore prefix to external labels on macOS
1 parent 5f7fc1f commit 95cb63e

1 file changed

Lines changed: 2 additions & 18 deletions

File tree

a86/printer.rkt

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,10 @@
3737
;(string-append "$" (symbol->string s) " wrt ..plt")
3838
;(symbol->string s)))]))
3939

40-
(define (label-symbol->string_old s)
41-
;; This should maybe be handled specially in the printing of Call rather
42-
;; than in every label...
43-
(if (and (eq? (system-type 'os) 'unix) (current-shared?) (memq s (current-extern-labels)))
44-
; hack for ELF64 shared libraries in service of
45-
; calling external functions in asm-interp
46-
;(string-append "$" (symbol->string s) " wrt ..plt")
47-
(symbol->string s)
48-
(string-append "_" (symbol->string s))))
49-
50-
51-
(define extern-label-decl-symbol->string-new
40+
(define extern-label-decl-symbol->string
5241
(match (system-type 'os)
5342
['macosx (λ (s) (string-append "_" (symbol->string s)))]
54-
[_ (λ (s)
55-
(symbol->string s))]))
56-
57-
58-
(define (extern-label-decl-symbol->string s)
59-
(string-append "" (symbol->string s)))
43+
[_ (λ (s) (symbol->string s))]))
6044

6145
;; Instruction -> String
6246
(define (common-instruction->string i)

0 commit comments

Comments
 (0)