- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'd compiled the library 'glib' and experienced a strange phenomenon. The attached file 'garray.s' is the assembly one that is generated from 'garray.c' of 'glib-2.24.2'. When I assembled it, the relocation date for 'R_NIOS2_PCREL_LO' inside the function 'g_ptr_array_new' became00001390 00003817 R_NIOS2_CALL16 00000000 memset + 0
000013d4 0000351b R_NIOS2_PCREL_HA 00000000 _GLOBAL_OFFSET_TABLE_ + 0
000013d8 0000351a R_NIOS2_PCREL_LO 00000000 _GLOBAL_OFFSET_TABLE_ + 20 <---
000013e4 00005317 R_NIOS2_CALL16 00001404 g_ptr_array_sized_new + 0
. Of course the right relocation data must be
00001390 00003417 R_NIOS2_CALL16 00000000 memset + 0
000013d4 0000311b R_NIOS2_PCREL_HA 00000000 _GLOBAL_OFFSET_TABLE_ + 0
000013d8 0000311a R_NIOS2_PCREL_LO 00000000 _GLOBAL_OFFSET_TABLE_ + 4 <---
000013e4 00004f17 R_NIOS2_CALL16 00001404 g_ptr_array_sized_new + 0
. I think this is a bug of 'gas' itself and not one of Nios ported part. Inside the 'gas', 'obstack chunk' is used to store the location data, but something is wrong to allocate a new chunk. The easiest and negative way to avoid this is only to increase the chunk size which is defined in the file 'as.c'. Please refer the attached 'diff' for the details. Kazu
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page