Skip to content

Commit

Permalink
虚函数指针、虚函数表中.rodate改为.rodata
Browse files Browse the repository at this point in the history
  • Loading branch information
huihut committed Jun 13, 2018
1 parent 2e48a76 commit 4b07a48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ virtual int A() = 0;
### 虚函数指针、虚函数表

* 虚函数指针:在含有虚函数类的对象中,指向虚函数表,在运行时确定。
* 虚函数表:在程序只读数据段(`.rodate section`,见:[目标文件存储结构](#%E7%9B%AE%E6%A0%87%E6%96%87%E4%BB%B6%E5%AD%98%E5%82%A8%E7%BB%93%E6%9E%84)),存放虚函数指针,如果派生类实现了基类的某个虚函数,则在虚表中覆盖原本基类的那个虚函数指针,在编译时根据类的声明创建。
* 虚函数表:在程序只读数据段(`.rodata section`,见:[目标文件存储结构](#%E7%9B%AE%E6%A0%87%E6%96%87%E4%BB%B6%E5%AD%98%E5%82%A8%E7%BB%93%E6%9E%84)),存放虚函数指针,如果派生类实现了基类的某个虚函数,则在虚表中覆盖原本基类的那个虚函数指针,在编译时根据类的声明创建。

### 虚继承、虚函数

Expand Down

0 comments on commit 4b07a48

Please sign in to comment.