Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
179 user(s) are online (168 user(s) are browsing Forums)

Members: 1
Guests: 178

trixie, more...

Support us!

Headlines

 
  Register To Post  

« 1 ... 14 15 16 (17) 18 19 20 21 »
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@All
And Max find out why we do crashes with .so linking : that was because by default we put .rodata into not writable segment, while in adtools version it is. Once we make .rodata be in writable segments, then .so linking works and no more crashes.

Question is: why .rodata neesd to be writable segment, to make .sobjs working ? Any reasons for ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@kas1e

chars are defined as read only, can be trying to modify a string?
is there a example of this behavior? Where does it actually crash?

Can we dump what variable that was defined in the .rodata and what variable is defined writeable area. Did someone wrongfully define something as const?

can it be write protecting it before initializing classes, perhaps.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@LiveForIt

I don't think it is bugos source. The source can be found from Issue 139 from aba1/adtools.

If the .rodata section is write protected, the executable fails with:

AmigaOne X5000 release
Machine model
(AmigaOne X5000/20)
Dump of context at 0xEFD653E0
Trap type
Program exception
Current kernel stack pointer
0x021697B0
Machine State 
(raw): 0x0002F030
Machine State 
(verbose): [Critical Ints on] [ExtInt on] [User] [IAT on] [DAT on]
Instruction pointer0x7FFC9CE0
Crashed process
test_dyn (0x6613C630)
Program exception verbose description:
Illegal instruction
Exception Syndrome Register
0x08000000
 0
E0A4D59C 60689C60 00000002 60706008 00000118 00000040 60A0E680 00000003
 8
60A0E68C 7FFC90F0 00000008 60689BD0 000007A8 61294CF8 60671578 00000001
16
65FB99BC 608CC420 65D4D010 00000000 60689DA8 7FFC9004 0201DBF0 0201DBCC
24
0201DB90 0201DB74 00000001 0201DBB0 613777B0 00000004 60A166A8 60689C60
CR
59555335   XERC000006F  CTR7FFC90F0  LR7FFC9120
Temporary stack trace
:
#0: 0x7FFC9CE0
#1: in module elf.library.kmod+0x00009898 (0x019879D8)
#2: in module newlib.library.kmod+0x00000228 (0x01A5E128)
#3: in module newlib.library.kmod+0x000025D8 (0x01A604D8)
#4: in module newlib.library.kmod+0x00003340 (0x01A61240)
#5: in module newlib.library.kmod+0x00003864 (0x01A61764)
#6: 0x7FA3628C
#7: in module dos.library.kmod+0x00029E18 (0x01959018)
#8: in module kernel+0x0005F280 (0x0185F280)
#9: in module kernel+0x0005F2F8 (0x0185F2F8)
#10: 0x00000000

msr0x00003032
TLB1 
(64 entries):
 * [ 
50]: size=7 tid 0 TS 1 epn=0xFE000000 rpn=0x0000000F_FE000000 WIMG=0x5 XXWWRR=0xF protected
 * [ 
51]: size=6 tid 0 TS 1 epn=0x01000000 rpn=0x00000000_01000000 WIMG=0x0 XXWWRR=0x5 protected
 * [ 
52]: size=6 tid 0 TS 1 epn=0x01400000 rpn=0x00000000_01400000 WIMG=0x0 XXWWRR=0x5 protected
 * [ 
53]: size=6 tid 0 TS 1 epn=0x01800000 rpn=0x00000000_01800000 WIMG=0x0 XXWWRR=0x33 protected
 * [ 
54]: size=6 tid 0 TS 1 epn=0x01C00000 rpn=0x00000000_01C00000 WIMG=0x0 XXWWRR=0x33 protected
 * [ 
55]: size=5 tid 0 TS 1 epn=0x02000000 rpn=0x00000000_02000000 WIMG=0x0 XXWWRR=0xF protected
 * [ 
56]: size=5 tid 0 TS 1 epn=0x02100000 rpn=0x00000000_02100000 WIMG=0x0 XXWWRR=0xF protected
 * [ 
57]: size=5 tid 0 TS 1 epn=0x02200000 rpn=0x00000000_02200000 WIMG=0x0 XXWWRR=0xF protected
 * [ 
58]: size=4 tid 0 TS 1 epn=0x02300000 rpn=0x00000000_02300000 WIMG=0x0 XXWWRR=0xF protected
 * [ 
59]: size=4 tid 0 TS 1 epn=0x02340000 rpn=0x00000000_02340000 WIMG=0x0 XXWWRR=0xF protected
 * [ 
60]: size=3 tid 0 TS 1 epn=0x02380000 rpn=0x00000000_02380000 WIMG=0x0 XXWWRR=0xF protected
 * [ 
61]: size=7 tid 0 TS 0 epn=0xFE000000 rpn=0x0000000F_FE000000 WIMG=0x5 XXWWRR=0xF protected
 * [ 
62]: size=A tid 0 TS 0 epn=0x00000000 rpn=0x00000000_00000000 WIMG=0x0 XXWWRR=0x3F protected
 * [ 
63]: size=A tid 0 TS 0 epn=0x40000000 rpn=0x00000000_40000000 WIMG=0x0 XXWWRR=0x3F protected
HAL_MaxTLB 49HAL_NextTLB 0
MMUCFG 
0x064809C4
mas0 
0x103F0000
mas1 
0xC0000A00
mas2 
0x40000000
mas3 
0x4000003F
mas4 
0x00000100
mas5 
0x00000000
mas6 
0x00000001
mas7 
0x00000000
mas8 
0x00000000

Disassembly of crash site
:
 
7FFC9CD000000000   .word             0x00000000
 7FFC9CD4
00000000   .word             0x00000000
 7FFC9CD8
00000000   .word             0x00000000
 7FFC9CDC
00000000   .word             0x00000000
>7FFC9CE000000000   .word             0x00000000
 7FFC9CE4
00000000   .word             0x00000000
 7FFC9CE8
00000000   .word             0x00000000
 7FFC9CEC
00000000   .word             0x00000000
 7FFC9CF0
00000000   .word             0x00000000
 7FFC9CF4
00000000   .word             0x00000000

Kernel command line
serial

Registers pointing to code
:
r9 Work:8/capehill/new_ld/libf.so:ctor()+0x0 (section 7 0xEC)
r13module LIBS:AmiSSL/amissl_v312.library at 0x61294CF8 (section 2 0x1CD4)
r15module test_dyn at 0x00000001 (section 0 0xFFFFFFDC)
r21Work:8/capehill/new_ld/libf.so:__shlib_call_constructors()+0x0 (section 7 0x0)
r22native kernel module elf.library.kmod+0x0069fab0
r23
native kernel module elf.library.kmod+0x0069fa8c
r24
native kernel module elf.library.kmod+0x0069fa50
r25
native kernel module elf.library.kmod+0x0069fa34
r26
module test_dyn at 0x00000001 (section 0 0xFFFFFFDC)
r27native kernel module elf.library.kmod+0x0069fa70
ip 
unknown (0x7FFC9CE0)
lr Work:8/capehill/new_ld/libf.so:ctor()+0x30 (section 7 0x11C)
ctrWork:8/capehill/new_ld/libf.so:ctor()+0x0 (section 7 0xEC)

Stack trace:
(
0x60689C600x7FFC9CE0 [cannot decode symbol]
(
0x60689C70Work:8/capehill/new_ld/libf.so:ctor()+0x30 (section 7 0x11C)
(
0x60689CD0native kernel module newlib.library.kmod+0x00000228
(0x60689D10native kernel module newlib.library.kmod+0x000025d8
(0x60689D60native kernel module newlib.library.kmod+0x00003340
(0x60689F10native kernel module newlib.library.kmod+0x00003864
(0x60689F40test_dyn:_start()+0x1e0 (section 7 0x3288)
(
0x60689F90native kernel module dos.library.kmod+0x00029e18
(0x60689FC0native kernel module kernel+0x0005f280
(0x60689FD0native kernel module kernel+0x0005f2f8

Disassembly of crash site
:
 
7FFC9CD000000000   .word             0x00000000
 7FFC9CD4
00000000   .word             0x00000000
 7FFC9CD8
00000000   .word             0x00000000
 7FFC9CDC
00000000   .word             0x00000000
>7FFC9CE000000000   .word             0x00000000
 7FFC9CE4
00000000   .word             0x00000000
 7FFC9CE8
00000000   .word             0x00000000
 7FFC9CEC
00000000   .word             0x00000000
 7FFC9CF0
00000000   .word             0x00000000
 7FFC9CF4
00000000   .word             0x00000000
Stack pointer 
(0x60689C60is inside bounds
Redzone is OK 
(4)

68k register dump
DATA
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ADDR
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

Ready Tasks
                           WinFrame 1 Process 
(pri   5sigrec 0x00800000sigwait 0xFF800000masked 0x00800000)
                                 
compose.task (pri   1sigrec 0x00000020sigwait 0x00000021masked 0x00000020)
                                    
Workbench (pri   1sigrec 0x80000100sigwait 0x80000000masked 0x80000000)
                                      
AmiDock (pri   0sigrec 0x00300100sigwait 0x00000100masked 0x00000100)
                           
NotificationServer (pri   0sigrec 0x08000000sigwait 0xF8001000masked 0x08000000)
                               
TCP/IP Control (pri   0sigrec 0x40000100sigwait 0xF8009080masked 0x40000000)
                                
ELF Collector (pri  -5sigrec 0x00000100sigwait 0x00000100masked 0x00000100)
                             
CPUDock_idleTask (pri -127sigrec 0x00000000sigwait 0x40000000masked 0x00000000)
                                    
idle.task (pri -128sigrec 0x00000000sigwait 0x00000000masked 0x00000000)

Waiting Tasks
                   DH2
/SmartFilesystem 1.293  (pri  10sigrec 0x00000000sigwait 0xE0000100masked 0x00000000)
                      
p50x0sata.device Port 0 (pri  12sigrec 0x10000000sigwait 0xC0007000masked 0x00000000)
                        
appdir envarc manager (pri -50sigrec 0x00000000sigwait 0x00000100masked 0x00000000)
                            
dos_signal_server (pri  -5sigrec 0x00000000sigwait 0x00000100masked 0x00000000)
                          
gfx FSL DMA handler (pri   0sigrec 0x00000000sigwait 0x80000000masked 0x00000000)
                                  
dopus_clock (pri   1sigrec 0x00000000sigwait 0xC0000000masked 0x00000000)
                       
DMA1 Channel 4 Handler (pri   0sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                                    
hub.usbfd (pri   0sigrec 0x00000000sigwait 0x30000000masked 0x00000000)
                                    
hub.usbfd (pri   0sigrec 0x80000000sigwait 0x30000000masked 0x00000000)
                  
EHCI Controller Task Unit 1 (pri  15sigrec 0x00000000sigwait 0xBE009000masked 0x00000000)
                                    
USB stack (pri  18sigrec 0x00000000sigwait 0xFC00D000masked 0x00000000)
                  
EHCI Controller Task Unit 0 (pri  15sigrec 0x00000000sigwait 0xBE009000masked 0x00000000)
                           
vsata disk changer (pri   0sigrec 0x00000000sigwait 0x80000000masked 0x00000000)
                       
ScreenBlanker Library. (pri   1sigrec 0x00000100sigwait 0xE8001000masked 0x00000000)
                       
CON/con-handler 53.82  (pri   5sigrec 0x00000000sigwait 0xB8000100masked 0x00000000)
                   
DH3/SmartFilesystem 1.293  (pri  10sigrec 0x00000000sigwait 0xE0000100masked 0x00000000)
                                    
hid.usbfd (pri  10sigrec 0x00000100sigwait 0xE0000000masked 0x00000000)
                                 
HID Keyboard (pri  10sigrec 0x00000000sigwait 0x90001000masked 0x00000000)
                                
serial.device (pri   1sigrec 0x00000000sigwait 0x7E000000masked 0x00000000)
                       
DMA2 Channel 3 Handler (pri   0sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                       
DMA1 Channel 3 Handler (pri   0sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                       
DMA2 Channel 2 Handler (pri   0sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                       
DMA1 Channel 2 Handler (pri   0sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                       
DMA2 Channel 1 Handler (pri   0sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                       
DMA1 Channel 1 Handler (pri   0sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                       
DMA2 Channel 4 Handler (pri   0sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                           
dos_filedir_notify (pri   5sigrec 0x80000000sigwait 0x40001000masked 0x00000000)
                     
ICD1/CDFileSystem 53.11  (pri  10sigrec 0x00000000sigwait 0x00000100masked 0x00000000)
                     
ICD0/CDFileSystem 53.11  (pri  10sigrec 0x00000000sigwait 0x00000100masked 0x00000000)
                   
DH2/SmartFilesystem 1.293  (pri  11sigrec 0x00000000sigwait 0x00000100masked 0x00000000)
                   
DH3/SmartFilesystem 1.293  (pri  11sigrec 0x00000000sigwait 0x00000100masked 0x00000000)
                    
URL/launch-handler 53.39  (pri   5sigrec 0x00000100sigwait 0x80000000masked 0x00000000)
              
TEXTCLIP/textclip-handler 53.4  (pri   3sigrec 0x00000100sigwait 0x80000000masked 0x00000000)
                  
RANDOM/Random-Handler 52.1  (pri   5sigrec 0x00000000sigwait 0x00000100masked 0x00000000)
                               
P50x0 Ethernet (pri  20sigrec 0x00000000sigwait 0x00001000masked 0x00000000)
                                   
RexxMaster (pri   4sigrec 0x00000100sigwait 0xC0000000masked 0x00000000)
                                        
rx_gc (pri 100sigrec 0x00000000sigwait 0x80000001masked 0x00000000)
            
application.library messageserver (pri   0sigrec 0x00000000sigwait 0xC0000000masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x80000010masked 0x00000000)
                               
Background CLI (pri   0sigrec 0x00000100sigwait 0x14001080masked 0x00000000)
                                       
X-Dock (pri   0sigrec 0x01000100sigwait 0xFE001000masked 0x00000000)
                                    
hid.usbfd (pri  10sigrec 0x00000100sigwait 0xE0000000masked 0x00000000)
                                    
HID Mouse (pri  10sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                               
ramlib.support (pri  -2sigrec 0x00000000sigwait 0x80005000masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x80000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                  New 
Process (pri   0sigrec 0x00000000sigwait 0x00000010masked 0x00000000)
                                       
ramlib (pri   1sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                                 
ContextMenus (pri   0sigrec 0x00000000sigwait 0xE0001000masked 0x00000000)
                         
KeymapSwitcher.docky (pri   0sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                         
TCP/IP Configuration (pri   0sigrec 0x00000100sigwait 0xF8003000masked 0x00000000)
              
ContextMenus Command Dispatcher (pri   1sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                                 
Mounter Task (pri  -1sigrec 0x00000000sigwait 0xB0001000masked 0x00000000)
                                  
Mounter GUI (pri   0sigrec 0x00000000sigwait 0x80007000masked 0x00000000)
                    
Mounter Companion Process (pri  -1sigrec 0x00000000sigwait 0x80003000masked 0x00000000)
                     
Workbench DosList Notify (pri   1sigrec 0x00000100sigwait 0x00003000masked 0x00000000)
                                      
AsyncWB (pri   0sigrec 0x00000100sigwait 0xC0001000masked 0x00000000)
                                    
CDDAPatch (pri   0sigrec 0x00000100sigwait 0x80001000masked 0x00000000)
                       
CON/con-handler 53.82  (pri   5sigrec 0x00000000sigwait 0xA0000100masked 0x00000000)
                       
CON/con-handler 53.82  (pri   5sigrec 0x00000000sigwait 0xA0000100masked 0x00000000)
                                     
RAWBInfo (pri   0sigrec 0x00000100sigwait 0x80001000masked 0x00000000)
                                         
FKey (pri   0sigrec 0x00000100sigwait 0xC000D000masked 0x00000000)
                       
CON/con-handler 53.82  (pri   5sigrec 0x00000000sigwait 0xA0000100masked 0x00000000)
                                 
ClickToFront (pri  21sigrec 0x00000100sigwait 0xE000D000masked 0x00000000)
                                     
DefIcons (pri   0sigrec 0x00000100sigwait 0x80009000masked 0x00000000)
                       
CON/con-handler 53.82  (pri   5sigrec 0x00000000sigwait 0xA0000100masked 0x00000000)
                       
CON/con-handler 53.82  (pri   5sigrec 0x00000000sigwait 0xA0000100masked 0x00000000)
                               
Background CLI (pri   0sigrec 0x00000100sigwait 0x54009000masked 0x00000000)
                   
Workbench Clipboard Server (pri   1sigrec 0x00000100sigwait 0x80000000masked 0x00000000)
                           
TCP/IP Superserver (pri   0sigrec 0x00000100sigwait 0xD0000080masked 0x00000000)
                                   
TCP/IP Log (pri   0sigrec 0x00000000sigwait 0x80003000masked 0x00000000)
                                   
▒ IPrefs ▒ (pri   0sigrec 0x00000000sigwait 0x0000F000masked 0x00000000)
                                
dopus_arbiter (pri   0sigrec 0x00000000sigwait 0x00000100masked 0x00000000)
                                
dopus_hotkeez (pri   1sigrec 0x00000000sigwait 0xC0000000masked 0x00000000)
           
texteditor.gadget Clipboard Server (pri   1sigrec 0x00000100sigwait 0x80000000masked 0x00000000)
                          
select.gadget prefs (pri   0sigrec 0x00000100sigwait 0x80001000masked 0x00000000)
                                    
hid.usbfd (pri  10sigrec 0x00000100sigwait 0xE0000000masked 0x00000000)
                                      
ConClip (pri   0sigrec 0x00000000sigwait 0x80000000masked 0x00000000)
                                 
HID Consumer (pri  10sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                                 
HID Consumer (pri  10sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                      
diskimage.device unit 1 (pri   4sigrec 0x00000100sigwait 0xC0000000masked 0x00000000)
                      
diskimage.device unit 0 (pri   4sigrec 0x00000100sigwait 0xC0000000masked 0x00000000)
                      
diskimage.device unit 5 (pri   4sigrec 0x00000100sigwait 0xC0000000masked 0x00000000)
                      
diskimage.device unit 4 (pri   4sigrec 0x00000100sigwait 0xC0000000masked 0x00000000)
                                 
HID Keyboard (pri  10sigrec 0x00000000sigwait 0x90001000masked 0x00000000)
                                 
HID Keyboard (pri  10sigrec 0x00000000sigwait 0x90001000masked 0x00000000)
                                 
HID Keyboard (pri  10sigrec 0x00000000sigwait 0x90001000masked 0x00000000)
                                 
HID Keyboard (pri  10sigrec 0x00000000sigwait 0x90001000masked 0x00000000)
                                    
hid.usbfd (pri  10sigrec 0x00000100sigwait 0xE0000000masked 0x00000000)
                                 
HID Joystick (pri  10sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                                    
hid.usbfd (pri  10sigrec 0x00000100sigwait 0xE0000000masked 0x00000000)
                                    
hid.usbfd (pri  10sigrec 0x00000100sigwait 0xE0000000masked 0x00000000)
                                    
hid.usbfd (pri  10sigrec 0x00000100sigwait 0xE0000000masked 0x00000000)
                                    
hid.usbfd (pri  10sigrec 0x00000100sigwait 0xE0000000masked 0x00000000)
                                    
hid.usbfd (pri  10sigrec 0x00000100sigwait 0xE0000000masked 0x00000000)
                                    
hid.usbfd (pri  10sigrec 0x00000100sigwait 0xE0000000masked 0x00000000)
                                    
HID Mouse (pri  10sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                                 
HID Consumer (pri  10sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                                    
HID Mouse (pri  10sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                       
AUDIO/AHI-Handler 6.2  (pri   5sigrec 0x00000000sigwait 0x00000100masked 0x00000000)
                 
APPDIR/appdir-handler 54.21  (pri   5sigrec 0x00000100sigwait 0x80000000masked 0x00000000)
                            
USB stack Process (pri   0sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                         
MassStorage Notifier (pri   0sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                                  
DST watcher (pri   0sigrec 0x00000000sigwait 0xC0000000masked 0x00000000)
                               
NotifyA Server (pri   1sigrec 0x00000000sigwait 0xE8001000masked 0x00000000)
                         
string.gadget server (pri   1sigrec 0x00000100sigwait 0x40000000masked 0x00000000)
                            
datatypes.library (pri   1sigrec 0x00000000sigwait 0x80001000masked 0x00000000)
                       
RAM/ram-handler 54.26  (pri  10sigrec 0x00000100sigwait 0x80000000masked 0x00000000)
                       
ENV/env-handler 54.19  (pri   5sigrec 0x00000100sigwait 0x80000000masked 0x00000000)
                       
CON/con-handler 53.82  (pri   5sigrec 0x00000000sigwait 0xA0000100masked 0x00000000)
                       
RAW/con-handler 53.82  (pri   5sigrec 0x00000000sigwait 0xA0000100masked 0x00000000)
                       
CON/con-handler 53.82  (pri   5sigrec 0x00000000sigwait 0xA0000100masked 0x00000000)
                          
SFS DosList handler (pri  19sigrec 0x00000000sigwait 0x80000000masked 0x00000000)
                             
dos_nbmd_process (pri   5sigrec 0x00000000sigwait 0x00001100masked 0x00000000)
                             
dos_lock_handler (pri   5sigrec 0x00000000sigwait 0x00001100masked 0x00000000)
                                    
hub.usbfd (pri   0sigrec 0x00000000sigwait 0x30000000masked 0x00000000)
                                    
hub.usbfd (pri   0sigrec 0x00000000sigwait 0x30000000masked 0x00000000)
                                    
hub.usbfd (pri   0sigrec 0x00000000sigwait 0x30000000masked 0x00000000)
                                    
hub.usbfd (pri   0sigrec 0x00000000sigwait 0x30000000masked 0x00000000)
                      
p50x0sata.device Port 1 (pri  12sigrec 0x00000000sigwait 0xC0007000masked 0x00000000)
                     
Exec Command and Control (pri  30sigrec 0x00000000sigwait 0x80000000masked 0x00000000)

Suspended Tasks


Somether you see it fails at

(0x60689C70Work:8/capehill/new_ld/libf.so:ctor()+0x30 (section 7 0x11C)


And if disaamble the method, there is nothing uncommon:


ppc-amigaos-objdump -d libf.so --disassemble=ctor

libf
.so:     file format elf32-powerpc-amigaos


Disassembly of section 
.text:

10000460 <ctor>:
10000460:       94 21 ff f0     stwu    r1,-16(r1)
10000464:       7c 08 02 a6     mflr    r0
10000468
:       90 01 00 14     stw     r0,20(r1)
1000046c:       93 c1 00 08     stw     r30,8(r1)
10000470:       93 e1 00 0c     stw     r31,12(r1)
10000474:       7c 3f 0b 78     mr      r31,r1
10000478
:       42 9f 00 05     bcl     20,4*cr7+so,1000047c <ctor+0x1c>
1000047c:       7f c8 02 a6     mflr    r30
10000480
:       80 1e ff e0     lwz     r0,-32(r30)
10000484:       7f c0 f2 14     add     r30,r0,r30
10000488
:       80 7e 80 00     lwz     r3,-32768(r30)
1000048c:       48 00 0b c5     bl      10001050 <puts@plt>
10000490:       60 00 00 00     nop
10000494
:       39 7f 00 10     addi    r11,r31,16
10000498
:       80 0b 00 04     lwz     r0,4(r11)
1000049c:       7c 08 03 a6     mtlr    r0
100004a0
:       83 cb ff f8     lwz     r30,-8(r11)
100004a4:       83 eb ff fc     lwz     r31,-4(r11)
100004a8:       7d 61 5b 78     mr      r1,r11
100004ac
:       4e 80 00 20     blr


Than there is relecation in the .rela.plt section

10001050  00000415 R_PPC_JMP_SLOT    00000000   puts 0


But nothing that indicates that data from .rodata section is target. So i think that the current elf.library makes something which want to modify data in the .rodata section or the associated segemnt with it.

Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@Max
It seems that not cleary the case (i mean about write protected thing).

See, that what we have with adtools version:

ppc-amigaos-readelf -l test_dyn
 
Elf file type is EXEC 
(Executable file)
Entry point 0x1003560
There are 6 program headers
starting at offset 52
 
Program Headers
:
  
Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR           0x000034 0x01000034 0x01000034 0x000c0 0x000c0 R E 0x4
  INTERP         0x0000f4 0x010000f4 0x010000f4 0x00011 0x00011 R   0x1
      
[Requesting program interpreter: /usr/lib/ld.so.1]
  
LOAD           0x000000 0x01000000 0x01000000 0x03a08 0x04078 R E 0x10000
  LOAD           0x005000 0x01005000 0x01005000 0x000b0 0x000b0 R   0x10000
  LOAD           0x0050b0 0x010150b0 0x010150b0 0x000d8 0x00130 RW  0x10000
  DYNAMIC        0x0050c0 0x010150c0 0x010150c0 0x000b8 0x000b8 RW  0x4
 
 Section to Segment mapping
:
  
Segment Sections...
   
00
   01     
.interp
   02     
.interp .hash .dynsym .dynstr .rela.bss .rela.plt .text .plt
   03     
.rodata .__newlib_version
   04     
.ctors .dtors .dynamic .data .got .sbss .bss
   05     
.dynamic


See, the .rodata is in the 03 , and marked as "R". All ok. ReadOnly as it should be and all works.


Next, our new crashed-ld were looks like this:

ppc-amigaos-readelf -l test_dyn
 
Elf file type is EXEC 
(Executable file)
Entry point 0x1003520
There are 5 program headers
starting at offset 52
 
Program Headers
:
  
Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR           0x000034 0x01000034 0x01000034 0x000a0 0x000a0 R   0x4
  INTERP         0x0000d4 0x010000d4 0x010000d4 0x00011 0x00011 R   0x1
      
[Requesting program interpreter: /usr/lib/ld.so.1]
  
LOAD           0x000000 0x01000000 0x01000000 0x050b0 0x050b0 R E 0x10000
  LOAD           0x0050b0 0x010150b0 0x010150b0 0x000d8 0x00130 RW  0x10000
  DYNAMIC        0x0050c0 0x010150c0 0x010150c0 0x000b8 0x000b8 RW  0x4
 
 Section to Segment mapping
:
  
Segment Sections...
   
00
   01     
.interp
   02     
.interp .hash .dynsym .dynstr .rela.bss .rela.plt .text .plt .rodata .__newlib_version
   03     
.ctors .dtors .dynamic .data .got .sbss .bss
   04     
.dynamic


See, the .rodata and __newlib_version are in the 02 , but 02 is marked as "R E" . And so, we then crash.

And then, after we add the WRITABLE_RODATA fix, and didn't crash, we have then that:

ppc-amigaos-readelf -l test_dyn
 
Elf file type is EXEC 
(Executable file)
Entry point 0x1003520
There are 5 program headers
starting at offset 52
 
Program Headers
:
  
Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR           0x000034 0x01000034 0x01000034 0x000a0 0x000a0 R   0x4
  INTERP         0x0000d4 0x010000d4 0x010000d4 0x00011 0x00011 R   0x1
      
[Requesting program interpreter: /usr/lib/ld.so.1]
  
LOAD           0x000000 0x01000000 0x01000000 0x05000 0x05000 R E 0x10000
  LOAD           0x005000 0x01015000 0x01015000 0x00188 0x001e0 RW  0x10000
  DYNAMIC        0x005010 0x01015010 0x01015010 0x000b8 0x000b8 RW  0x4
 
 Section to Segment mapping
:
  
Segment Sections...
   
00
   01     
.interp
   02     
.interp .hash .dynsym .dynstr .rela.bss .rela.plt .text .plt
   03     
.ctors .dtors .dynamic .data .rodata .__newlib_version .got .sbss .bss
   04     
.dynamic


See, we now have .rodata in 03, which is marked as "RW" , and we have binary working.

I do not know currently why we crash exactly , it can be:

1). because we have .rodata in RE (while original adtools one is just R)
2). or because we have .rodata in the same place where .text , .plt and co , and just the fact that .plt is not the end of segment.


Currently, we simple "fix" it , but putting .rodata inside of writable area together with .ctors, .dtors and stuff , but i am sure it's not very correct. Because it should be Read Only, so being marked as R (as it in original adtools), and not RE or RW .

With "RW" we seem to simple workaround issue.


Edited by kas1e on 2023/8/30 14:56:16
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@kas1e

OK, maybe the cause is that the .rodata is even marked as Executable, and that causes the crash, and moving .rodata being writable has the side effect of getting rid of the E flag.

Thus the Writebale flag is not really needed. But it has the side effect of getting rid of the Executable flag. Which than don't led to an crash.

Best solution should be to have .rodata only flagged as Readable without any other flags. Which will results in that .rodata gets its own segment. Thus looking more like the old binutils.

Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@MigthyMax

Is there any chance its virtual / private, local data is passed as arguments and end up all sort of places. If swapped out it be bad.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
I'd say .rodata being writable may be a red herring. Does the output before the crash, with "setenv ELF.debug 1", give any clues?

IBrowse, AmiSSL and Warp Datatype Developer
Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@Futaura
At least with RW on .rodata it works and didnt crash, same as if it just R, but crash if we RE, i.e. marked as execute. Will check elf output before crash.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@kas1e

Here it is crashing when calling the .ctors functions. I've double-checked all this by disassembling and peeking at the crashed code in memory and it seems .ctors is being relocated correctly. Although the crashlog might not always indicate it, it looks like it is the puts@plt call which crashes, because that jumps to the wrong address due to the reloc not having been applied. R_PPC_PLTREL24 relocs are always ignored by elf.library (there's a note about it in the relnotes).

I'm not up to speed with shared objects, so my question is where should the jump offset be corrected? Is this something that elf.library should be doing or is the wrong code being generated by the compiler?

Certainly, I've not seen any crashes that indicate that .rodata is being written to, so it is probably related to the physical position of .rodata - relocs will be different then too.

(apologies for the heavy re-edit - hopefully, nobody read the first version )


Edited by Futaura on 2023/8/30 17:22:40
Edited by Futaura on 2023/8/30 17:24:47
IBrowse, AmiSSL and Warp Datatype Developer
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
The elf.library relnotes in question appear to indicate that there may have been special modifications to binutils to make the PLT work:

- R_PPC_PLTREL24 relocs are now ignored for version 2 shared objects, since the
jumps are already correctly targeted at the PLT entries.

- R_PPC_JMP_SLOT relocs now correctly update the dynamic symbol table. On top
of that, the original PLT setup is no longer written here but rather when
setting up the PLT section.

- Lazy binding works now that the PLT is actually used. Note that for all of
the above to work, the latest binutils are required.

This is all from 2009.

I might be wrong, but it looks like the puts@plt jump is not targeted at a PLT entry.

IBrowse, AmiSSL and Warp Datatype Developer
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@Futaura

Quote:
I might be wrong, but it looks like the puts@plt jump
is not targeted at a PLT entry.


I read/objdupo/readelf a lot too, and comes to nearly the same conclusion that the PLT entry seems to be wrong.

The PLT is build by the dynamic linker (elf.library). Reading the ABI the implementation is specific for each OS
target. But the lazy variant is to setup traps methods, which gets called resolves the desired address of the
function, patches the PLT and/or the calling code (I didn't understand that completely), so that the next call
doesn't need to be trapped, but just execute the desired method.

So long for the theory. Disassemble the code and sections etc from the build with the old binutils to the new binutils,
i only found differences which I think of might have an impact.

The .rodata section has no standalone read only segment:

Segment/Section old binutils look like this:

Quote:
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x10000000 0x10000000 0x00688 0x01060 R E 0x10000
LOAD 0x002000 0x10002000 0x10002000 0x00034 0x00034 R 0x10000
LOAD 0x002034 0x10012034 0x10012034 0x000f8 0x000f8 RW 0x10000
DYNAMIC 0x002074 0x10012074 0x10012074 0x000a8 0x000a8 RW 0x4

Section to Segment mapping:
Segment Sections...
00 .hash .dynsym .dynstr .rela.dyn .rela.got2 .rela.plt .text .plt
01 .rodata
02 .ctors .dtors .got2 .dynamic .data .got
03 .dynamic


The new binutils:

Quote:

Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x10000000 0x10000000 0x02034 0x02034 R E 0x10000
LOAD 0x002034 0x10012034 0x10012034 0x000f8 0x000f8 RW 0x10000
DYNAMIC 0x002074 0x10012074 0x10012074 0x000a8 0x000a8 RW 0x4

Section to Segment mapping:
Segment Sections...
00 .hash .dynsym .dynstr .rela.dyn .rela.got2 .rela.plt .text .plt .rodata
01 .ctors .dtors .got2 .dynamic .data .got
02 .dynamic


The address and size differs too, but that is just owed to being a newer binutils version.
And because .rodata (The read only data section) only contains static data, I don't see how
this should affect the PLT stuff. As you too mention, you do not see any reference fo that too.

But modifying the new binutils to let the .rodata section being writable, triggers something
in the elf.library that the PLT function call works again. But another side effect is that
ctor/dtor call "chaining" is broken.

So i focused to see what else changes if in the new binutils rodata section is set to writeable,
the segments/section look like this:

Quote:

Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x010000 0x10000000 0x10000000 0x011b8 0x011b8 R E 0x10000
LOAD 0x012000 0x10012000 0x10012000 0x001d8 0x001d8 R 0x10000
LOAD 0x0121d8 0x100221d8 0x100221d8 0x000f0 0x000f0 RW 0x10000
DYNAMIC 0x012200 0x10022200 0x10022200 0x000b8 0x000b8 RW 0x4

Section to Segment mapping:
Segment Sections...
00 .plt .text
01 .hash .dynsym .dynstr .rela.dyn .rela.got2 .rela.plt .rodata
02 .init_array .fini_array .got2 .dynamic .got
03 .dynamic


This variant i Think works without a crash, but doesn't have any .text.rela section:

Quote:

Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .plt NOBITS 10000000 010000 000060 00 AX 0 0 4
[ 2] .text PROGBITS 10001000 011000 0001b8 00 AX 0 0 4
[ 3] .hash HASH 10012000 012000 00003c 04 A 4 0 4
[ 4] .dynsym DYNSYM 1001203c 01203c 0000a0 10 A 5 2 4
[ 5] .dynstr STRTAB 100120dc 0120dc 000038 00 A 0 0 1
[ 6] .rela.dyn RELA 10012114 012114 000030 0c A 4 0 4
[ 7] .rela.got2 RELA 10012144 012144 000048 0c AI 4 13 4
[ 8] .rela.plt RELA 1001218c 01218c 000018 0c AI 4 1 4
[ 9] .rodata PROGBITS 100121a4 0121a4 000031 00 A 0 0 4
[10] .eh_frame PROGBITS 100121d8 0121d8 000000 00 A 0 0 4
[11] .init_array INIT_ARRAY 100221d8 0121d8 000008 04 WA 0 0 4
[12] .fini_array FINI_ARRAY 100221e0 0121e0 000008 04 WA 0 0 4
[13] .got2 PROGBITS 100221e8 0121e8 000018 00 WA 0 0 4
[14] .dynamic DYNAMIC 10022200 012200 0000b8 08 WA 5 0 4
[15] .got PROGBITS 100222b8 0122b8 000010 04 WA 0 0 4
[16] .comment PROGBITS 00000000 0122c8 000023 01 MS 0 0 1
[17] .symtab SYMTAB 00000000 0122ec 000220 10 18 26 4
[18] .strtab STRTAB 00000000 01250c 000094 00 0 0 1
[19] .shstrtab STRTAB 00000000 0125a0 000097 00 0 0 1


Which doesn't make any sense for me to skip that section. But thus the
relocation R_PPC_PLTREL24 is missing from the sobj file. So at least
this verifies that this relocation is ignored by the elf.library, or better
elf.library doesn't care that this is missing.

Anyway without insight what the elf.library actually does for PLT, I think
I'm stuck.

Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@MigthyMax

Fortunately, I can build elf.library and add extra debug to try to figure out what is going on...

I'm not an expert on dynamic objects, but looking at the .rela.plt section, all the R_PPC_JMP_SLOT symbol values are 0 (readelf -r) with the new binutils. The elf lib uses these values to calculate the "real address", which it then puts in the PLT. I don't think they should be 0 - they need to point to the location of the respective function in .text (at least, that's the case in libc.so).

IBrowse, AmiSSL and Warp Datatype Developer
Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@Futaura
Quote:

symbol values are 0 (readelf -r) with the new binutils


Just in case: Did you also build new binutils from Max's repo or mean from the output Max post ? Why i ask, because the latest version we had is in this branch: https://github.com/migthymax/binutils- ... crashes-in-some-condition
(just in case, so everyone in sync)

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@Futaura

Quote:

I don't think they should be 0 - they need to point to the location of the
respective function in .text (at least, that's the case in libc.so).


I'm neither an expert, but the value depends on where the function is. If the
function is outside the own sobj the value should be zero. (I don't fin the
reference anymore) As long i remember the zero indicates to the dynamic
linker -> you have to do stuff to find the address of my desired method.
A none zero value can directly be used to calculate the address in .text section.
But the method must be present in the sobj file.
Probably there are more things to consider if going more in detail, but that should be
the general path.

An elf.library with more debug out can always help. But maybe you can look at
the elf source, and tell how the PLT table is build by the elf.library for sobjs files.

Go to top
Re: gcc 9 and 10
Just can't stay away
Just can't stay away


See User information
@MigthyMax
Quote:
The PLT is build by the dynamic linker (elf.library). Reading the ABI the implementation is specific for each OS
target. But the lazy variant is to setup traps methods, which gets called resolves the desired address of the
function, patches the PLT and/or the calling code (I didn't understand that completely), so that the next call
doesn't need to be trapped, but just execute the desired method.
I'm not 100% sure, but I don't think elf.library works that way.
Instead of using traps which resolve it on first access it loads all .so used by the executable and resolves everything before _start() in the executable is called.

Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@kas1e

I'm afraid I don't have the time to start compiling binutils, so I'm just using your example files that you posted to the beta list.

@MigthyMax

You're right, of course - serves me right for starting to look at this late at night! I've traced through the PLT setup and it does actually look to be working correctly. Instead, the problem appears to be that elf.library is allocating and loading all the sections in segment 1 separately (which includes .text, .plt and .rodota), which I haven't quite figured out yet - it only seems to be seeing the data segment during these searches. The end result is that because R_PPC_PLTREL24 relocs are intentionally ignored, the in place branches jump to the wrong address. For it to work .text and .plt must be located in the same block of memory, so the offsets to the .plt jump table are correct. Just trying to figure out why this isn't happening.

The PLT jump table is created at load time, with the jumps poked into the table when R_PPC_JMP_SLOT relocs are resolved (after other necessary objects have been loaded). The jump table is part of the .plt section, which the fixed branches in .text point to. I don't think the problem is directly related to this now.

IBrowse, AmiSSL and Warp Datatype Developer
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
Annoyingly I had early ignored "Ignoring this program header because we have an .rodata segment" in the debug output, which you'll see with ELF.debug set to 1, thinking it wasn't relevant. But, this would appear to be the reason for the behaviour I described in my previous message. That is why it works fine when .rodata is in its own segment, because then the segment containing the .text/.plt sections is loaded into a single block of memory, making the PLT branches correct.

Why does elf.library need to do this - to make 68k cross calls work, according to the comments (need to do some more research to understand this!).

So, does the old binutils always put .rodata in its own segment for dynamic objects? I'm sure .text and .rodata have always gone in the same segment for normal non-dynamic stuff.

IBrowse, AmiSSL and Warp Datatype Developer
Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@Futaura
Quote:

I'm afraid I don't have the time to start compiling binutils, so I'm just using your example files that you posted to the beta list.

Ok, this test case was without latest change where Max make .rodata be as RW for tests , so .sobjs start to works, but ctor/dtors chaining broken. In the test case which i send to beta-test group, .rodata is RE, and so .sobjs broken, but ctro/dtors chaining works.

So we need .rodata to be R as with adtool's binutils

Quote:

So, does the old binutils always put .rodata in its own segment for dynamic objects? I'm sure .text and .rodata have always gone in the same segment for normal non-dynamic stuff.


At least with this simple test case i send to beta-group builds with adtools version of binutils, we do have that:

test_dyn binary:

Program Headers:
  
Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR           0x000034 0x01000034 0x01000034 0x000c0 0x000c0 R E 0x4
  INTERP         0x0000f4 0x010000f4 0x010000f4 0x00011 0x00011 R   0x1
      
[Requesting program interpreter: /usr/lib/ld.so.1]
  
LOAD           0x000000 0x01000000 0x01000000 0x03a08 0x04078 R E 0x10000
  LOAD           0x005000 0x01005000 0x01005000 0x000b0 0x000b0 R   0x10000
  LOAD           0x0050b0 0x010150b0 0x010150b0 0x000d8 0x00130 RW  0x10000
  DYNAMIC        0x0050c0 0x010150c0 0x010150c0 0x000b8 0x000b8 RW  0x4

 Section to Segment mapping
:
  
Segment Sections...
   
00
   01     
.interp
   02     
.interp .hash .dynsym .dynstr .rela.bss .rela.plt .text .plt
   03     
.rodata .__newlib_version
   04     
.ctors .dtors .dynamic .data .got .sbss .bss
   05     
.dynamic


And libf.so:

Program Headers:
  
Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000000 0x10000000 0x10000000 0x00688 0x01060 R E 0x10000
  LOAD           0x002000 0x10002000 0x10002000 0x00034 0x00034 R   0x10000
  LOAD           0x002034 0x10012034 0x10012034 0x000f8 0x000f8 RW  0x10000
  DYNAMIC        0x002074 0x10012074 0x10012074 0x000a8 0x000a8 RW  0x4

 Section to Segment mapping
:
  
Segment Sections...
   
00     .hash .dynsym .dynstr .rela.dyn .rela.got2 .rela.plt .text .plt
   01     
.rodata
   02     
.ctors .dtors .got2 .dynamic .data .got
   03     
.dynamic

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@kas1e

Yes, I'm using your test case that had .rodata in the same segment as .text/.plt. This was perfect to exactly understand what was really causing elf.library to crash the code. It had nothing to do with .rodata being in a writable, read-only or executable segment. It was simply the placement - for dynamic objects, .rodata must not be placed in the same segment as .text/.plt with the current elf.library. As you say, .rodata should obviously be read-only. That must be why the old binutils did it that way.

However, I'm pondering whether elf.library needs to do this anymore. So far, I'm struggling to understand what the original reason was, so reluctant to change anything. The change happened in elf.library 53.4:

Quote:
Program header loadable segments are now loaded as segment even if they are executable. This caused some problems with older binaries that have .text and .rodata in the same segment; if the loader detects such a segment, it is ignored and the sections are loaded separately. This behaviour is required because the PLT must be correctly placed relative to the text segment.


Edited by Futaura on 2023/9/8 18:50:12
Edited by Futaura on 2023/9/8 19:50:15
IBrowse, AmiSSL and Warp Datatype Developer
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
Having modified elf.library to always load the .text/.plt segment in one go, rather than each section separately, the OS won't boot, so looks like I won't be changing that behaviour . Perhaps could be an alignment issue, although not really sure - in both cases, .rodata is marked as read-only, as you would expect.

What matters is that the behaviour was specifically changed to load the .text/.plt segment in one go, mainly to make the PLT stuff work for dynamic objects. So, we know what the correct thing is for binutils to do now.

If there are still issues with ctors/dtors not working, even when .rodata placed in a separate read only segment, I'm happy to check the relevant code in the latest elf.library (I believe Alfkil changed it so that it calls the ctors/dtors directly, right?). Just point me in the direction of a compiled test case, so I can reproduce the issue here.

IBrowse, AmiSSL and Warp Datatype Developer
Go to top

  Register To Post
« 1 ... 14 15 16 (17) 18 19 20 21 »

 




Currently Active Users Viewing This Thread: 5 ( 0 members and 5 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project