bss 가 뭔가요?

jaeswith의 이미지

kernel panic 메시지에 대한 ksymoops 의 해석입니다.

다른건 심볼로 변환이 되어 있는데요.
제가 짠 모듈인 ksovia 는 [ksovia].bss.start 라고 되어 있네요.
bss 가 어떤 부분을 이야기 하는 건가요?
objdump 로 제가 짠 모듈을 봐도, bss 라는게 나오긴 하는데.. 정확히 무엇인지 잘 모르겠습니다.

이런 정보를 알려면, 어느 부분을 찾아봐야 하나요?

Trace; c0118999 <bh_action+39/50>
Trace; f0ab7254 <[ksovia].bss.start+b4/205f>
Trace; f0ab7268 <[ksovia].bss.start+c8/205f>
Trace; c011b8d9 <mod_timer+29/d0>
Trace; f0ab5ea8 <[ksovia].rodata.end+98b/1b83>
Trace; f0ab5ea8 <[ksovia].rodata.end+98b/1b83>
Trace; c01188cb <tasklet_init+1b/30>
Trace; c01187df <tasklet_action+f/70>
Trace; c01185fb <sys_adjtimex+4b/b0>
Trace; c01cd7e8 <tcp_recvmsg+628/800>
Trace; c01a1e42 <isapnp_print_dma+132/140>
Trace; c0170254 <do_con_trol+d14/f30>
Trace; c016f776 <do_con_trol+236/f30>
Trace; c01e4495 <devinet_ioctl+2f5/650>
Trace; c01abfbc <fbcon_cfb24_putc+13c/300>
Trace; c013dc44 <locate_fd+a4/f0>
Trace; c01ac1e7 <fbcon_cfb24_putcs+67/3b0>
Trace; c0130bb6 <sys_chroot+b6/120>
Trace; c0106f1b <system_call+33/38>

jyj9782의 이미지

bss 는 ELF 섹션중의 하나입니다..
ELF 섹션관련된 문서를 보세요
http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/specialsections.html

.bss
This section holds uninitialized data that contribute to the program's memory image. By definition, the system initializes the data with zeros when the program begins to run. The section occupies no file space, as indicated by the section type, SHT_NOBITS

이 섹션은 비초기화된 데이타를 프로그램의 메모리 이미지에 포함한다. 프로그램 작동시작할때는 0으로 초기화한다는군요. 그리고 파일의 용량은 차지하지 않는 섹션이라고 나와 있군요.

비초기화한 데이타라고 하면..

이런게 될수 있죠

main(){
int a;
}

초기화된 데이타라함은..

main(){
int a=0;
}

헤헤 ELF 섹션문서 보세요 ..

힘내세요.

pynoos의 이미지

jyj9782 wrote:

main(){
int a;
}

main(){
int a=0;
}

아쉽게도 위 예는 bss에 뭔가를 만들지 않습니다. stack 에 잡히기 때문에 object에는 영역이 할당되지 않습니다. run time에서 잡히죠.

bss 는 전역 변수나 static local 변수가 초기화 되지 않는 꼴로 되어 있을 때 잡힙니다.

jyj9782의 이미지

아차차 .. ㅡㅡ; 저 아는것임.. 까먹은것뿐임;; ㅋㅋ

힘내세요.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.