Changeset 11916


Ignore:
Timestamp:
Apr 9, 2009, 6:07:17 AM (10 years ago)
Author:
gb
Message:

New, improved, advanced versions of Apple's linker can't deal with
references to the objc 'personality' routine from the eh_frame section
unless those references use @GOTPCREL addressing and we can't refer
to the real personality routine (objc_personality_v0) without linking
against libraries that'd keep the fake CFBundle path stuff from working.

Create a little lisp function (lisp_objc_personality) which just jumps
to the value of the objc_2_personality lisp_global (it shouldn't be
possible to get an ObjC exception before this is initialized.) Reference
the lisp function via @GOTPCREL from the exception-handling metadata.

This hasn't yet been tested on Tiger, but the only test to pass there
is "linking without error" (since this ObjC2 exception stuff was introduced
in Leopard.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-spentry64.s

    r11913 r11916  
    50885088        __ifdef([DARWIN])
    50895089        .if 1
     5090C(lisp_objc_personality):
     5091        jmp *lisp_global(objc_2_personality)
     5092       
    50905093        .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
    50915094EH_frame1:
     
    50995102        .byte   0x78    /* sleb128 -8; CIE Data Alignment Factor */
    51005103        .byte   0x10    /* CIE RA Column */
    5101         .byte   0xb
    5102         .byte   0x8c
    5103         .quad   _lisp_objc_personality
     5104        .byte   0x7
     5105        .byte   0x9b
     5106        .long   _lisp_objc_personality+4@GOTPCREL
    51045107        .byte   0x10    /* LSDA Encoding (pcrel) */
    51055108        .byte   0x10    /* FDE Encoding (pcrel) */
Note: See TracChangeset for help on using the changeset viewer.