Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147592126
D34590.1783833569.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D34590.1783833569.diff
View Options
Index: sys/cddl/dev/fbt/x86/fbt_isa.c
===================================================================
--- sys/cddl/dev/fbt/x86/fbt_isa.c
+++ sys/cddl/dev/fbt/x86/fbt_isa.c
@@ -231,7 +231,9 @@
for (hash = fbt_probetab[FBT_ADDR2NDX(instr)]; hash != NULL;
hash = hash->fbtp_hashnext) {
if (hash->fbtp_patchpoint == fbt->fbtp_patchpoint) {
- fbt->fbtp_tracenext = hash->fbtp_tracenext;
+ while (hash->fbtp_tracenext != NULL)
+ hash = hash->fbtp_tracenext;
+ fbt->fbtp_tracenext = NULL;
hash->fbtp_tracenext = fbt;
break;
}
@@ -344,8 +346,18 @@
fbt->fbtp_savedval = *instr;
fbt->fbtp_patchval = FBT_PATCHVAL;
- fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)];
- fbt_probetab[FBT_ADDR2NDX(instr)] = fbt;
+ for (hash = fbt_probetab[FBT_ADDR2NDX(instr)]; hash != NULL;
+ hash = hash->fbtp_hashnext) {
+ if (hash->fbtp_patchpoint == fbt->fbtp_patchpoint) {
+ fbt->fbtp_tracenext = hash;
+ fbt_probetab[FBT_ADDR2NDX(instr)] = fbt;
+ break;
+ }
+ }
+ if (hash == NULL) {
+ fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)];
+ fbt_probetab[FBT_ADDR2NDX(instr)] = fbt;
+ }
lf->fbt_nentries++;
Index: sys/kern/link_elf.c
===================================================================
--- sys/kern/link_elf.c
+++ sys/kern/link_elf.c
@@ -1766,9 +1766,11 @@
link_elf_each_function_nameval(linker_file_t file,
linker_function_nameval_callback_t callback, void *opaque)
{
- linker_symval_t symval;
+ linker_symval_t symval, symval1;
+ c_linker_sym_t sym;
elf_file_t ef = (elf_file_t)file;
const Elf_Sym *symp;
+ long diff;
int i, error;
/* Exhaustive search */
@@ -1777,9 +1779,22 @@
(ELF_ST_TYPE(symp->st_info) == STT_FUNC ||
ELF_ST_TYPE(symp->st_info) == STT_GNU_IFUNC)) {
error = link_elf_debug_symbol_values(file,
- (c_linker_sym_t) symp, &symval);
- if (error == 0)
+ (c_linker_sym_t)symp, &symval);
+ if (error == 0) {
+ if (ELF_ST_TYPE(symp->st_info) ==
+ STT_GNU_IFUNC) {
+ error = link_elf_search_symbol(file,
+ symval.value, &sym, &diff);
+ if (error == 0 && diff == 0) {
+ error = link_elf_debug_symbol_values(file,
+ sym, &symval1);
+ if (error == 0)
+ symval.size =
+ symval1.size;
+ }
+ }
error = callback(file, i, &symval, opaque);
+ }
if (error != 0)
return (error);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jul 12, 5:19 AM (2 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29089233
Default Alt Text
D34590.1783833569.diff (2 KB)
Attached To
Mode
D34590: fbt: Generate return probes for ifuncs
Attached
Detach File
Event Timeline
Log In to Comment