send2vinnie / mclinker

Automatically exported from code.google.com/p/mclinker
Other
0 stars 0 forks source link

Define standard symbols #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Standard symbols:
section symbols)
__preinit_array_start
__preinit_array_end
__init_array_start
__init_array_end
__fini_array_start
__fini_array_end
__stack

segment symbols)
__executable_start
etext
_etext
__etext
_edata
edata
__bss_start
_end
end

Original issue reported on code.google.com by LubaTang on 28 May 2012 at 9:46

GoogleCodeExporter commented 9 years ago
If I move step 7.a. in SectLinker::doFinialization() after postLayout (step 
10.b), then some regression tests fail. (undefined reference to 
__GLOBAL_OFFSET_TABLE__) I guess the failure due to __GLOBAL_OFFSET_TABLE__ is 
local.

Can I move addTargetSymbols() and addStandardSymbols() after postLayout()? If I 
should not do that, why?

Original comment by LubaTang on 28 May 2012 at 10:39

GoogleCodeExporter commented 9 years ago
Hi, Diana,

Do we have regression tests for this issue?
Or if you can give me some cases, I can make the regression tests.

Best regards,
Luba

Original comment by LubaTang on 29 May 2012 at 6:08

GoogleCodeExporter commented 9 years ago
Here is a patch of regression test for exception handling. It needs 
__init_array_start and __init_array_end defined to link successfully. Currently 
the link result of this will be 
Error: undefined reference to `__init_array_end'
Error: undefined reference to `__init_array_start'
Error: undefined reference to `__init_array_start'

Note that I add "XFAIL: *" at the beginning of this test, so it won' be 
reported  failure.

Original comment by mysekki on 29 May 2012 at 6:46

Attachments:

GoogleCodeExporter commented 9 years ago
The symbol __init_array_end and __init_array_start are used in 
test/libs/X86/Linux/libc_nonshared/elf-init.oS
I'll try to make a regression test specific for it.

Original comment by mysekki on 29 May 2012 at 6:48

GoogleCodeExporter commented 9 years ago
Please check test/Symbols/sym_init_array.ll. This test link files with symbols 
__init_array_end and __init_array_start and check the output if they are ABS 
symbols.

Original comment by mysekki on 30 May 2012 at 1:59

GoogleCodeExporter commented 9 years ago
Standard and target symbols are defined.
Thanks Diana, the regression test is passed in Revision 993f816d7a71

Original comment by LubaTang on 30 May 2012 at 9:32