0 码力 |
38 页 |
5.95 MB
| 2 年前 3
restrict these types to SemiRegular to avoid confusion for your users
## BONUS SLIDES
## Object Relocation
One particularly sensitive topic about handling C++ values is that they are all conservatively non-relocatable.
https://github.com/facebook/folly/blob/master/folly/docs/FBVector.md#object-relocation
## Object Relocation
In contrast, a relocatable value would preserve its invariant, even if its bits were integrity.
https://github.com/facebook/folly/blob/master/folly/docs/FBVector.md#object-relocation
## Object Relocation

https://github
0 码力 |
180 页 |
19.96 MB
| 1 年前 3
you try to link a shared lib from obj files not built with fPIC and using global vars:
error: relocation R_X86_64_PC32 against symbol `global' can not be used when making a shared object; recompile
(a Huawei Company)
ofekshilon@gmail.com
OfekShilon
## More Rabbit Holes for the Curious
• Relocation details
• Weak linkage
• Versioning (both of libraries and of API)
• Granularity
• COMDAT, bagrintsev.me/CPP/dsohowto.pdf
• Eli Benderski:
https://eli.thegreenplace.net/2011/08/25/load-time-relocation-of-shared-libraries/
https://eli.thegreenplace.net/2011/11/03/position-independent-code-pic-in-shared-libraries/
0 码力 |
69 页 |
1.40 MB
| 1 年前 3
... (Darwin)
N Do not generate a relocation section.
PXXX Minimum iOS deployment version needed (iphonesim) XXX is one of 8.0, 8.0.2, etc.
R Generate a relocation section.
T Generate a TOOL application . (Darwin)
-WN Do not generate relocation code, needed for debugging (Windows)
-WP Minimum iOS deployment version: 8.0, 8.0.2, ... (iphonesim)
-WR Generate relocation code (Windows)
-WX Enable executable information in a relocatable DLL.
Warning: To allow debugging for win32 code you need to disable relocation with -WN option Stabs debug info is wrong for relocatable DLL or EXES. Use -WN if you want to debug
0 码力 |
217 页 |
756.57 KB
| 2 年前 3
physical aspect of a program
• Relocation is done at load time
## Dynamic loading
• Ask for additional functionalities
• Often involve library discovery
• Relocation is done at run time
• May be capable
0 码力 |
100 页 |
3.98 MB
| 1 年前 3
about the ELF file, which can sometimes be useful for introspecting generated section headers, relocation entries and the symbol table.
In the unlikely case where clang and LLVM need to be compiled from the flag dwarfris (dwarf relocation in section) disables DWARF cross-section relocations between DWARF and the ELF's symbol table since libdw does not have proper BPF relocation support, and therefore able to properly dump structures from the object.
elfutils (>= 0.173) implements proper BPF relocation support and therefore the same can be achieved without the -mattr=dwarffris option. Dumping the
0 码力 |
740 页 |
12.52 MB
| 1 年前 3
about the ELF file, which can sometimes be useful for introspecting generated section headers, relocation entries and the symbol table.
In the unlikely case where clang and LLVM need to be compiled from the flag dwarfris (dwarf relocation in section) disables DWARF cross-section relocations between
DWARF and the ELF’s symbol table since libdw does not have proper BPF relocation support, and therefore tools to properly dump structures from the object.
elfutils ( $ >=0.173 $ ) implements proper BPF relocation support and therefore the same can be achieved without the -mattr=dwarfris option. Dumping the
0 码力 |
734 页 |
11.45 MB
| 1 年前 3
about the ELF file,
which can sometimes be useful for introspecting generated section headers,
relocation entries and the symbol table.
In the unlikely case where clang and LLVM need to be compiled from the flag dwarfris (dwarf
relocation in section) disables DWARF cross-section relocations between
DWARF and the ELF’s symbol table since libdw does not have proper BPF
relocation support, and therefore tools be able to
properly dump structures from the object.
elfutils (>= 0.173) implements proper BPF relocation support and therefore the same
can be achieved without the -mattr=dwarfris option. Dumping the
0 码力 |
885 页 |
12.41 MB
| 1 年前 3
if amqp_method == 20 {
// "consume" method
match cnt {
// trick to avoid relocation error, not using &1
None => unsafe { counts.set(&src, &amqp_type) },
0 码力 |
22 页 |
1.81 MB
| 1 年前 3