核符号表(Kernel Symbol Table)是什么东西?

博客介绍了内核使用变量或函数的地址,而人们更喜欢用符号名。在C语言编程时,编译器/连接程序可让我们使用符号名,内核运行时用地址表示。还指出存在需知道符号地址或地址对应符号的情况,可通过符号表实现,并给出了符号表例子。

内核并不使用符号名。它是通过变量或函数的地址(指针)来使用变量或函数的,而 不是使用size_t BytesRead,内核更喜欢使用(例如)c0343f20来引用 这个变量。

而另一方面,人们并不喜欢象c0343f20这样的名字。我们跟喜欢使用象 size_t BytesRead这样的表示。通常,这并不会带来什么问题。内核主要 是用C语言写成的,所以在我们编程时编译器/连接程序允许我们使用符号名,并且使 内核在运行时使用地址表示。这样大家都满意了。

然而,存在一种情况,此时我们需要知道一个符号的地址(或者一个地址对应的 符号)。这是通过符号表来做到的,与gdb能够从一个地址给出函数名(或者给出一个 函数名的地址)的情况很相似。符号表是所有符号及其对应地址的一个列表。这里是 一个符号表例子:

   c03441a0 B dmi_broken
   c03441a4 B is_sony_vaio_laptop
   c03441c0 b dmi_ident
   c0344200 b pci_bios_present
   c0344204 b pirq_table
   c0344208 b pirq_router
   c034420c b pirq_router_dev
   c0344220 b ascii_buffer
   c0344224 b ascii_buf_bytes
 
你可以看出名称为dmi_broken的变量位于内核地址c03441a0处。


 

Error! Symbol devm_bitmap_alloc not found in kernel file Error! Symbol utf8byte not found in kernel file Error! Symbol __traceiter_rpm_resume not found in kernel file Error! Symbol poly1305_final_arch not found in kernel file Error! Symbol lowpan_unregister_netdevice not found in kernel file Error! Symbol ip6_tnl_rcv not found in kernel file Error! Symbol nf_tproxy_laddr6 not found in kernel file Error! Symbol ipv6_chk_addr not found in kernel file Error! Symbol nvmem_add_cell_lookups not found in kernel file Error! Symbol __SCK__tp_func_android_rvh_blk_mq_delay_run_hw_queue not found in kernel file Error! Symbol __SCK__tp_func_android_vh_aes_decrypt not found in kernel file Error! Symbol dev_pm_qos_flags not found in kernel file Error! Symbol __blkdev_driver_ioctl not found in kernel file Error! Symbol synth_event_add_field_str not found in kernel file Error! Symbol __SCK__tp_func_android_vh_page_isolated_for_reclaim not found in kernel file Error! Symbol hid_field_extract not found in kernel file Error! Symbol scsi_device_resume not found in kernel file Error! Symbol queue_iova not found in kernel file Error! Symbol sbitmap_show not found in kernel file Error! Symbol kernel_read_file_from_path not found in kernel file Error! Symbol ipv6_find_tlv not found in kernel file Error! Symbol neigh_changeaddr not found in kernel file Error! Symbol amba_apb_device_add_res not found in kernel file Error! Symbol crypto_unregister_notifier not found in kernel file Error! Symbol invalidate_inode_pages2 not found in kernel file Error! Symbol trace_vbprintk not found in kernel file Error! Symbol ipt_do_table not found in kernel file Error! Symbol udp_sock_create4 not found in kernel file Error! Symbol __hw_addr_ref_sync_dev not found in kernel file Error! Symbol snd_soc_dai_compr_get_params not found in kernel file Error! Symbol snd_soc_dai_compr_set_params not found in kernel file Error! Symbol v4l2_m2m_ioctl_try_decoder_cmd not found in kernel file Error! Symbol nvdimm_namespace_detach_btt not found in kernel file Error! Symbol nvdimm_namespace_attach_btt not found in kernel file Error! Symbol ring_buffer_entries not found in kernel file Error! Symbol alloc_skb_for_msg not found in kernel file Error! Symbol acc_ctrlrequest not found in kernel file Error! Symbol drm_clflush_sg not found in kernel file Error! Symbol mpi_ec_add_points not found in kernel file Error! Symbol blkcg_root_css not found in kernel file Error! Symbol proc_create_net_data not found in kernel file Error! Symbol d_instantiate_anon not found in kernel file Error! Symbol kvm_vcpu_is_visible_gfn not found in kernel file Error! Symbol nf_ct_get_tuple_skb not found in kernel file Error! Symbol nvmem_register_notifier not found in kernel file Error! Symbol hdmi_spd_infoframe_pack_only not found in kernel file Error! Symbol gpiochip_irq_domain_activate not found in kernel file Error! Symbol sprint_OID not found in kernel file Error! Symbol sprint_oid not found in kernel file Error! Symbol acomp_request_free not found in kernel file Error! Symbol xp_raw_get_dma not found in kernel file Error! Symbol nfc_alloc_recv_skb not found in kernel file Error! Symbol ip_tunnel_ctl not found in kernel file Error! Symbol rndis_rm_hdr not found in kernel file Error! Symbol amba_device_alloc not found in kernel file Error! Symbol pci_epc_mem_exit not found in kernel file Error! Symbol pci_epc_mem_init not found in kernel file Error! Symbol async_unregister_domain not found in kernel file Error! Symbol __iptunnel_pull_header not found in kernel file Error! Symbol inet_csk_clear_xmit_timers not found in kernel file Error! Symbol reuseport_alloc not found in kernel file Error! Symbol snd_pcm_hw_param_value not found in kernel file Error! Symbol regulator_unregister_supply_alias not found in kernel file Error! Symbol fat_time_unix2fat not found in kernel file Error! Symbol fs_param_is_u64 not found in kernel file Error! Symbol fs_param_is_s32 not found in kernel file Error! Symbol fs_param_is_u32 not found in kernel file Error! Symbol kmsg_dump_reason_str not found in kernel file Error! Symbol nf_nat_follow_master not found in kernel file Error! Symbol drm_modeset_lock_single_interruptible not found in kernel file Error! Symbol tty_get_pgrp not found in kernel file Error! Symbol uuid_is_valid not found in kernel file Error! Symbol unregister_asymmetric_key_parser not found in kernel file Error! Symbol fuse_dev_release not found in kernel file Error! Symbol ring_buffer_oldest_event_ts not found in kernel file Error! Symbol ipi_get_hwirq not found in kernel file Error! Symbol tcp_read_sock not found in kernel file Error! Symbol of_find_net_device_by_node not found in kernel file Error! Symbol scsi_host_busy not found in kernel file Error! Symbol pinconf_generic_dt_subnode_to_map not found in kernel file Error! Symbol guid_parse not found in kernel file Error! Symbol io_cgrp_subsys_on_dfl_key not found in kernel file Error! Symbol snd_dmaengine_pcm_unregister not found in kernel file Error! Symbol snd_soc_dapm_nc_pin_unlocked not found in kernel file Error! Symbol __SCK__tp_func_android_vh_sched_pelt_multiplier not found in kernel file Error! Symbol cpuidle_register_driver not found in kernel file Error! Symbol phylink_mii_c22_pcs_set_advertisement not found in kernel file Error! Symbol scsi_eh_prep_cmnd not found in kernel file Error! Symbol firmware_request_platform not found in kernel file Error! Symbol tty_port_register_device_attr not found in kernel file Error! Symbol devm_regulator_unregister_supply_alias not found in kernel file Error! Symbol pci_set_cacheline_size not found in kernel file Error! Symbol copy_page_from_iter not found in kernel file Error! Symbol match_octal not found in kernel file Error! Symbol xt_register_targets not found in kernel file Error! Symbol __SCK__tp_func_android_vh_alloc_pages_reclaim_bypass not found in kernel file Error! Symbol crc32c not found in kernel file Error! Symbol iomap_dio_rw not found in kernel file Error! Symbol poll_freewait not found in kernel file Error! Symbol snd_timer_pause not found in kernel file Error! Symbol __SCK__tp_func_android_rvh_check_preempt_wakeup not found in kernel file Error! Symbol vhost_chr_poll not found in kernel file Error! Symbol typec_cable_set_identity not found in kernel file Error! Symbol radix_tree_delete_item not found in kernel file Error! Symbol _copy_from_iter_full_nocache not found in kernel file Error! Symbol crypto_finalize_akcipher_request not found in kernel file Error! Symbol kvm_unmap_gfn not found in kernel file Error! Symbol nf_nat_pptp_hook_outbound not found in kernel file Error! Symbol typec_unregister_plug not found in kernel file Error! Symbol usb_hub_claim_port not found in kernel file Error! Symbol drm_mode_legacy_fb_format not found in kernel file Error! Symbol tty_driver_kref_put not found in kernel file Error! Symbol regulator_bulk_free not found in kernel file Error! Symbol mpi_free not found in kernel file Error! Symbol xfrm_local_error not found in kernel file Error! Symbol sock_prot_inuse_get not found in kernel file Error! Symbol __SCK__tp_func_android_vh_wakeup_bypass not found in kernel file Error! Symbol drm_dp_mst_topology_state_funcs not found in kernel file Error! Symbol x509_decode_time not found in kernel file Error! Symbol iomap_readahead not found in kernel file Error! Symbol generic_write_end not found in kernel file Error! Symbol profile_hits not found in kernel file Error! Symbol udp6_seq_ops not found in kernel file Error! Symbol nat_t120_hook not found in kernel file Error! Symbol mini_qdisc_pair_init not found in kernel file Error! Symbol bpf_prog_create not found in kernel file Error! Symbol __SCK__tp_func_usb_gadget_disconnect not found in kernel file Error! Symbol property_entries_free not found in kernel file Error! Symbol security_inode_copy_up not found in kernel file Error! Symbol bpf_offload_dev_destroy not found in kernel file Error! Symbol __traceiter_module_get not found in kernel file Error! Symbol inet_sk_diag_fill not found in kernel file Error! Symbol arpt_unregister_table not found in kernel file Error! Symbol tcp_ca_openreq_child not found in kernel file Error! Symbol bpf_prog_destroy not found in kernel file Error! Symbol gether_setup_name_default not found in kernel file Error! Symbol LZ4_compress_default not found in kernel file Error! Symbol bio_copy_data_iter not found in kernel file Error! Symbol inode_insert5 not found in kernel file Error! Symbol deactivate_super not found in kernel file Error! Symbol synth_event_trace_array not found in kernel file 这种情况为什么不导出
06-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值