Microsoft/Visual Studio2016. 2. 24. 14:32

엥? #warning이 없어?



전처리기는 다음 지시문을 인식합니다.

[링크 : https://msdn.microsoft.com/ko-kr/library/3sxhs2ty.aspx]

    [링크 : https://msdn.microsoft.com/ko-kr/library/d9x1s805.aspx]


#pragma message( messagestring )

    [링크 : https://msdn.microsoft.com/ko-kr/library/x7dkzch2.aspx]



코드 이동성은 포기하고 MSVC와 GCC용 따로 짜야 할지도 -_-?!?


#pragma message ( "your warning text here" )

[링크 : http://stackoverflow.com/questions/171435/portability-of-warning-preprocessor-directive]

Posted by 구차니
프로그램 사용/xrdp2016. 2. 23. 15:18
빠르다

- xrdp에 vino를 붙이면 vnc로 로컬에서 하는 수준?


견고하다(?)
- 딱히 vnc 처럼 깨지는건 못 본 듯


ctrl-c,v가 된다

- vnc는 되다 안되다.. xming 쓰면 절대 안됨


물론 업로드 속도가 된다는 가정하겠지만

xrdp 설정해두고 보니 만세! 임


vino를 통해서 xrdp를 쓰면 로컬에서 하는거니까

chrome 등에서도 openGL 가속받을 수 있고 여러모로 유리함



---

음.. mplayer나 gstramer를 통해서 오디오는 전송이 안되네.. 설정이 누락된게 있나...

아니면.. session으로 한게 아니라 그런가? vino 니까?


lxde 세션이던 gnome vino던 둘다 안되네...

xrdp를 위해 pulseaudio로 뻘짓을 해야하는 건가?

'프로그램 사용 > xrdp' 카테고리의 다른 글

xrdp with pulseaudio  (0) 2016.02.24
xrdp.ini  (0) 2016.02.16
xrdp 구조?  (0) 2016.02.16
xrdp 3389 / lxde  (0) 2016.02.15
xrdp.. 사용가능한 세션 종류  (0) 2016.02.14
Posted by 구차니
하드웨어/Storage2016. 2. 22. 09:53

요즘 업데이트가 뜸하다고 해야하나..

그나저나.. 저번이 3인데 왜 이번이 5지?


Version: 5.2-5644 Update 5

(2016/02/19)

Fixed Issues

  1. Updated Firewall filter policy to fix a security vulnerability caused by stack-based buffer overflow (CVE-2015-7547). This fix may impact read/write performance on the following models by no more than 15%, for which Synology is working on an enhancement in the future release.
    • 16-series: DS216se
    • 15-series: DS115j
    • 14-series: EDS14, DS114, DS214se, RS214, DS414slim
    • 13-series: DS213j, DS213air, DS213, DS413j
    • 12-series: DS112, DS112+, DS112j, DS212, DS212j, DS212+, RS212, RS812
    • 11-series: DS111, DS211, DS211+, DS211j, DS411, DS411slim, DS411j, RS411
    • 10-series: DS110j, DS210j, DS410j


[링크 : https://www.synology.com/ko-kr/releaseNote/DS213j]

'하드웨어 > Storage' 카테고리의 다른 글

시놀로지 업데이트.. DSM 6.0!  (0) 2016.03.25
sdsc sdhc sdxc ...  (0) 2016.03.23
ipad용 ds file srt 자막 보기  (0) 2016.02.05
raid01 raid10  (0) 2016.01.31
synology DS file - file station  (0) 2016.01.05
Posted by 구차니
개소리 왈왈/블로그2016. 2. 22. 09:20

집에서 안되서 결국에는 회사와서 결제


회사는 win7 + ie11 인데 잘되는구만

왜 집에서는 안된거야? ㅠㅠ





어짜피 계속 쓸테니.. 걍 2년에 1.5만 결제

1년에 만원이나 머.. 5천원 더 쓰는건데 머... ㅠㅠ

Posted by 구차니
개소리 왈왈/블로그2016. 2. 21. 09:17

이 망할 ActiveX


Win10에 ie8이랑

Win7에 ie11 이었던가? 암튼.. 되는게 없어 ㅠㅠ


회사 가서 결제 해야지 어쩔... ㅠㅠ

'개소리 왈왈 > 블로그' 카테고리의 다른 글

문득... 살아있을까?  (0) 2016.04.27
웹호스팅 결제 -_-  (0) 2016.02.22
블로그 어워드 2015  (0) 2015.12.19
블로그 접어야 하나 ㅋㅋ  (0) 2015.11.14
다음 쪽지 종료 공지  (0) 2015.10.28
Posted by 구차니
개소리 왈왈/영화2016. 2. 20. 23:00

좀.. 기대 이하?

깨알 같은 셀프 디스가 일품이지만

조금 오버 스런 19금 연출들이 조금 눈에 거슬리고


저예산이라 그런지

일단 스토리도 너무 짧고 빈약하다는게 단점

65/100 점 정도 주면 되려나?

'개소리 왈왈 > 영화' 카테고리의 다른 글

더 플랜(2017) - 파파이스 인터넷 공개  (0) 2017.04.20
거울 나라의 엘리스 (2016)  (0) 2016.09.18
엑스맨: 데이즈 오브 퓨쳐 패스트(2014)  (0) 2014.06.01
역린(2014)  (0) 2014.05.11
수상한 그녀(2014)  (0) 2014.02.09
Posted by 구차니

어셈부터 다시 공부좀 해봐야 하나... ㅠㅠ


.text는 코드 영역

.data는 초기화 된 변수

.bss는 초기화되지 않은 변수


어짜피 실행파일(elf?) 에서는 stack / heap이 존재할 이유가 없으니

세개정도의 섹션만 분석하면 답이 나오려나..


highest address


=========

| stack |

|   v   |

|       |

|       |

|   ^   |

|  heap |

=========

|  bss  |

=========

| data  |

=========

| text  |

=========


address 0 


[링크 : https://bytes.com/topic/c/answers/854464-text-data-bss]

'Programming > Assembly(어셈블리)' 카테고리의 다른 글

fasm / nasm / masm  (0) 2015.06.13
어셈블리 관련  (0) 2015.06.11
ia32 어셈블리 언어  (0) 2013.12.12
.DATA? 지시어  (0) 2011.07.31
x86 register  (2) 2011.07.17
Posted by 구차니

1. olleh 하이브리드 에그

이번에 기계값 공짜로 1년간 20기가 더 준대서 문자로 보내달랬더니

대충 1.6만원 이래서 오.. 지금 1.2만원인데 혹해서

가슴이 산들산들 흔들흔들 했으나


확인해보니 10835원이네? 안가 ㅋㅋㅋ

그런데.. 솔찍히 좀 불편하기도 하고.. 약간은 흔들리는 내 마음 ㅠㅠ



[링크 : http://smartblog.olleh.com/4340]


2. ok 캐쉬백 빔프로젝터

필요없어요. 돈 없어요. 도 안통하네 ㄷㄷㄷ

아무튼.. 하루 천원 꼴 12개월 무이자 할부. HD급! 이래서 찾아봤는데

HD는 맞네 720p ㄷㄷ 그래도 많이 싸지고 많이 성능 올라갔네..


근데 쓸데가 없잖아? 패스~


[링크 : http://www.uo.co.kr/lifeware/mainView.app]

'개소리 왈왈 > 모바일 생활' 카테고리의 다른 글

아이나비 X1 dash 소감  (0) 2016.03.21
아이패드가 미쳤어요!!  (0) 2016.03.11
아이폰 어플 파일 관련  (0) 2015.12.21
다음달은 5천원을 목표로!!  (0) 2015.11.13
smardi GAM.r  (0) 2015.10.24
Posted by 구차니
Linux2016. 2. 18. 18:41

$ objdump -D -p --prefix-addresses

가 무난하려나..


Usage: objdump <option(s)> <file(s)>

 Display information from object <file(s)>.

 At least one of the following switches must be given:

  -a, --archive-headers    Display archive header information

  -f, --file-headers       Display the contents of the overall file header

  -p, --private-headers    Display object format specific file header contents

  -P, --private=OPT,OPT... Display object format specific contents

  -h, --[section-]headers  Display the contents of the section headers

  -x, --all-headers        Display the contents of all headers

  -d, --disassemble        Display assembler contents of executable sections

  -D, --disassemble-all    Display assembler contents of all sections

  -S, --source             Intermix source code with disassembly

  -s, --full-contents      Display the full contents of all sections requested

  -g, --debugging          Display debug information in object file

  -e, --debugging-tags     Display debug information using ctags style

  -G, --stabs              Display (in raw form) any STABS info in the file

  -W[lLiaprmfFsoRt] or

  --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,

          =frames-interp,=str,=loc,=Ranges,=pubtypes,

          =gdb_index,=trace_info,=trace_abbrev,=trace_aranges]

                           Display DWARF info in the file

  -t, --syms               Display the contents of the symbol table(s)

  -T, --dynamic-syms       Display the contents of the dynamic symbol table

  -r, --reloc              Display the relocation entries in the file

  -R, --dynamic-reloc      Display the dynamic relocation entries in the file

  @<file>                  Read options from <file>

  -v, --version            Display this program's version number

  -i, --info               List object formats and architectures supported

  -H, --help               Display this information 


       objdump [-a|--archive-headers]

               [-b bfdname|--target=bfdname]

               [-C|--demangle[=style] ]

               [-d|--disassemble]

               [-D|--disassemble-all]

               [-z|--disassemble-zeroes]

               [-EB|-EL|--endian={big | little }]

               [-f|--file-headers]

               [-F|--file-offsets]

               [--file-start-context]

               [-g|--debugging]

               [-e|--debugging-tags]

               [-h|--section-headers|--headers]

               [-i|--info]

               [-j section|--section=section]

               [-l|--line-numbers]

               [-S|--source]

               [-m machine|--architecture=machine]

               [-M options|--disassembler-options=options]

               [-p|--private-headers]

               [-P options|--private=options]

               [-r|--reloc]

               [-R|--dynamic-reloc]

               [-s|--full-contents]

               [-W[lLiaprmfFsoRt]|

                --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]]

               [-G|--stabs]

               [-t|--syms]

               [-T|--dynamic-syms]

               [-x|--all-headers]

               [-w|--wide]

               [--start-address=address]

               [--stop-address=address]

               [--prefix-addresses]

               [--[no-]show-raw-insn]

               [--adjust-vma=offset]

               [--special-syms]

               [--prefix=prefix]

               [--prefix-strip=level]

               [--insn-width=width]

               [-V|--version]

               [-H|--help]

               objfile... 



[링크 : http://sosal.kr/125]

[링크 : http://devanix.tistory.com/188]

[링크 : http://s3ize.blogspot.com/2012/08/tip-linux-objdump-command.html]

-x

--all-headers

Display all available header information, including the symbol table and relocation entries. Using -x is equivalent to specifying all of -a -f -h -p -r -t.


-h
--section-headers
--headers
Display summary information from the section headers of the object file.
File segments may be relocated to nonstandard addresses, for example by using the -Ttext, -Tdata, or -Tbss options to ld. However, some object file formats, such as a.out, do not store the starting address of the file segments. In those situations, although ld relocates the sections correctly, using objdump -h to list the file section headers cannot show the correct addresses. Instead, it shows the usual addresses, which are implicit for the target.

[링크 : http://linux.die.net/man/1/objdump]




+


gcc tttt.c

$ objdump -x a.out


a.out:     file format elf64-x86-64

a.out

architecture: i386:x86-64, flags 0x00000112:

EXEC_P, HAS_SYMS, D_PAGED

start address 0x0000000000400440


Program Header:

    PHDR off    0x0000000000000040 vaddr 0x0000000000400040 paddr 0x0000000000400040 align 2**3

         filesz 0x00000000000001f8 memsz 0x00000000000001f8 flags r-x

  INTERP off    0x0000000000000238 vaddr 0x0000000000400238 paddr 0x0000000000400238 align 2**0

         filesz 0x000000000000001c memsz 0x000000000000001c flags r--

    LOAD off    0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**21

         filesz 0x000000000000071c memsz 0x000000000000071c flags r-x

    LOAD off    0x0000000000000e28 vaddr 0x0000000000600e28 paddr 0x0000000000600e28 align 2**21

         filesz 0x00000000000001f8 memsz 0x0000000000000208 flags rw-

 DYNAMIC off    0x0000000000000e50 vaddr 0x0000000000600e50 paddr 0x0000000000600e50 align 2**3

         filesz 0x0000000000000190 memsz 0x0000000000000190 flags rw-

    NOTE off    0x0000000000000254 vaddr 0x0000000000400254 paddr 0x0000000000400254 align 2**2

         filesz 0x0000000000000044 memsz 0x0000000000000044 flags r--

EH_FRAME off    0x000000000000064c vaddr 0x000000000040064c paddr 0x000000000040064c align 2**2

         filesz 0x000000000000002c memsz 0x000000000000002c flags r--

   STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3

         filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-

   RELRO off    0x0000000000000e28 vaddr 0x0000000000600e28 paddr 0x0000000000600e28 align 2**0

         filesz 0x00000000000001d8 memsz 0x00000000000001d8 flags r--


Dynamic Section:

  NEEDED               libc.so.6

  INIT                 0x00000000004003f0

  FINI                 0x0000000000400638

  GNU_HASH             0x0000000000400298

  STRTAB               0x0000000000400318

  SYMTAB               0x00000000004002b8

  STRSZ                0x0000000000000053

  SYMENT               0x0000000000000018

  DEBUG                0x0000000000000000

  PLTGOT               0x0000000000600fe8

  PLTRELSZ             0x0000000000000030

  PLTREL               0x0000000000000007

  JMPREL               0x00000000004003c0

  RELA                 0x00000000004003a8

  RELASZ               0x0000000000000018

  RELAENT              0x0000000000000018

  VERNEED              0x0000000000400378

  VERNEEDNUM           0x0000000000000001

  VERSYM               0x000000000040036c


Version References:

  required from libc.so.6:

    0x09691a75 0x00 03 GLIBC_2.2.5

    0x0d696914 0x00 02 GLIBC_2.4


Sections:

Idx Name          Size      VMA               LMA               File off  Algn

  0 .interp       0000001c  0000000000400238  0000000000400238  00000238  2**0

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  1 .note.ABI-tag 00000020  0000000000400254  0000000000400254  00000254  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  2 .note.gnu.build-id 00000024  0000000000400274  0000000000400274  00000274  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  3 .gnu.hash     0000001c  0000000000400298  0000000000400298  00000298  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  4 .dynsym       00000060  00000000004002b8  00000000004002b8  000002b8  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  5 .dynstr       00000053  0000000000400318  0000000000400318  00000318  2**0

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  6 .gnu.version  00000008  000000000040036c  000000000040036c  0000036c  2**1

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  7 .gnu.version_r 00000030  0000000000400378  0000000000400378  00000378  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  8 .rela.dyn     00000018  00000000004003a8  00000000004003a8  000003a8  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  9 .rela.plt     00000030  00000000004003c0  00000000004003c0  000003c0  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 10 .init         00000018  00000000004003f0  00000000004003f0  000003f0  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 11 .plt          00000030  0000000000400410  0000000000400410  00000410  2**4

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 12 .text         000001f8  0000000000400440  0000000000400440  00000440  2**4

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 13 .fini         0000000e  0000000000400638  0000000000400638  00000638  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 14 .rodata       00000004  0000000000400648  0000000000400648  00000648  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 15 .eh_frame_hdr 0000002c  000000000040064c  000000000040064c  0000064c  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 16 .eh_frame     000000a4  0000000000400678  0000000000400678  00000678  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 17 .ctors        00000010  0000000000600e28  0000000000600e28  00000e28  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 18 .dtors        00000010  0000000000600e38  0000000000600e38  00000e38  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 19 .jcr          00000008  0000000000600e48  0000000000600e48  00000e48  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 20 .dynamic      00000190  0000000000600e50  0000000000600e50  00000e50  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 21 .got          00000008  0000000000600fe0  0000000000600fe0  00000fe0  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 22 .got.plt      00000028  0000000000600fe8  0000000000600fe8  00000fe8  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 23 .data         00000010  0000000000601010  0000000000601010  00001010  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 24 .bss          00000010  0000000000601020  0000000000601020  00001020  2**3

                  ALLOC

 25 .comment      0000002a  0000000000000000  0000000000000000  00001020  2**0

                  CONTENTS, READONLY

SYMBOL TABLE:

0000000000400238 l    d  .interp        0000000000000000              .interp

0000000000400254 l    d  .note.ABI-tag  0000000000000000              .note.ABI-tag

0000000000400274 l    d  .note.gnu.build-id     0000000000000000              .note.gnu.build-id

0000000000400298 l    d  .gnu.hash      0000000000000000              .gnu.hash

00000000004002b8 l    d  .dynsym        0000000000000000              .dynsym

0000000000400318 l    d  .dynstr        0000000000000000              .dynstr

000000000040036c l    d  .gnu.version   0000000000000000              .gnu.version

0000000000400378 l    d  .gnu.version_r 0000000000000000              .gnu.version_r

00000000004003a8 l    d  .rela.dyn      0000000000000000              .rela.dyn

00000000004003c0 l    d  .rela.plt      0000000000000000              .rela.plt

00000000004003f0 l    d  .init  0000000000000000              .init

0000000000400410 l    d  .plt   0000000000000000              .plt

0000000000400440 l    d  .text  0000000000000000              .text

0000000000400638 l    d  .fini  0000000000000000              .fini

0000000000400648 l    d  .rodata        0000000000000000              .rodata

000000000040064c l    d  .eh_frame_hdr  0000000000000000              .eh_frame_hdr

0000000000400678 l    d  .eh_frame      0000000000000000              .eh_frame

0000000000600e28 l    d  .ctors 0000000000000000              .ctors

0000000000600e38 l    d  .dtors 0000000000000000              .dtors

0000000000600e48 l    d  .jcr   0000000000000000              .jcr

0000000000600e50 l    d  .dynamic       0000000000000000              .dynamic

0000000000600fe0 l    d  .got   0000000000000000              .got

0000000000600fe8 l    d  .got.plt       0000000000000000              .got.plt

0000000000601010 l    d  .data  0000000000000000              .data

0000000000601020 l    d  .bss   0000000000000000              .bss

0000000000000000 l    d  .comment       0000000000000000              .comment

000000000040046c l     F .text  0000000000000000              call_gmon_start

0000000000000000 l    df *ABS*  0000000000000000              crtstuff.c

0000000000600e28 l     O .ctors 0000000000000000              __CTOR_LIST__

0000000000600e38 l     O .dtors 0000000000000000              __DTOR_LIST__

0000000000600e48 l     O .jcr   0000000000000000              __JCR_LIST__

0000000000400490 l     F .text  0000000000000000              __do_global_dtors_aux

0000000000601020 l     O .bss   0000000000000001              completed.6531

0000000000601028 l     O .bss   0000000000000008              dtor_idx.6533

0000000000400500 l     F .text  0000000000000000              frame_dummy

0000000000000000 l    df *ABS*  0000000000000000              crtstuff.c

0000000000600e30 l     O .ctors 0000000000000000              __CTOR_END__

0000000000400718 l     O .eh_frame      0000000000000000              __FRAME_END__

0000000000600e48 l     O .jcr   0000000000000000              __JCR_END__

0000000000400600 l     F .text  0000000000000000              __do_global_ctors_aux

0000000000000000 l    df *ABS*  0000000000000000              tttt.c

0000000000600e24 l       .ctors 0000000000000000              __init_array_end

0000000000600e50 l     O .dynamic       0000000000000000              _DYNAMIC

0000000000600e24 l       .ctors 0000000000000000              __init_array_start

0000000000600fe8 l     O .got.plt       0000000000000000              _GLOBAL_OFFSET_TABLE_

00000000004005f0 g     F .text  0000000000000002              __libc_csu_fini

0000000000601010  w      .data  0000000000000000              data_start

0000000000601020 g       *ABS*  0000000000000000              _edata

0000000000400638 g     F .fini  0000000000000000              _fini

0000000000000000       F *UND*  0000000000000000              __stack_chk_fail@@GLIBC_2.4

0000000000600e40 g     O .dtors 0000000000000000              .hidden __DTOR_END__

0000000000000000       F *UND*  0000000000000000              __libc_start_main@@GLIBC_2.2.5

0000000000601010 g       .data  0000000000000000              __data_start

0000000000000000  w      *UND*  0000000000000000              __gmon_start__

0000000000601018 g     O .data  0000000000000000              .hidden __dso_handle

0000000000400648 g     O .rodata        0000000000000004              _IO_stdin_used

0000000000400560 g     F .text  0000000000000089              __libc_csu_init

0000000000601030 g       *ABS*  0000000000000000              _end

0000000000400440 g     F .text  0000000000000000              _start

0000000000601020 g       *ABS*  0000000000000000              __bss_start

0000000000400524 g     F .text  0000000000000036              main

0000000000000000  w      *UND*  0000000000000000              _Jv_RegisterClasses

00000000004003f0 g     F .init  0000000000000000              _init 



디버깅 추가

$ gcc -g tttt.c

$ objdump -x a.out


a.out:     file format elf64-x86-64

a.out

architecture: i386:x86-64, flags 0x00000112:

EXEC_P, HAS_SYMS, D_PAGED

start address 0x0000000000400440


Program Header:

    PHDR off    0x0000000000000040 vaddr 0x0000000000400040 paddr 0x0000000000400040 align 2**3

         filesz 0x00000000000001f8 memsz 0x00000000000001f8 flags r-x

  INTERP off    0x0000000000000238 vaddr 0x0000000000400238 paddr 0x0000000000400238 align 2**0

         filesz 0x000000000000001c memsz 0x000000000000001c flags r--

    LOAD off    0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**21

         filesz 0x000000000000071c memsz 0x000000000000071c flags r-x

    LOAD off    0x0000000000000e28 vaddr 0x0000000000600e28 paddr 0x0000000000600e28 align 2**21

         filesz 0x00000000000001f8 memsz 0x0000000000000208 flags rw-

 DYNAMIC off    0x0000000000000e50 vaddr 0x0000000000600e50 paddr 0x0000000000600e50 align 2**3

         filesz 0x0000000000000190 memsz 0x0000000000000190 flags rw-

    NOTE off    0x0000000000000254 vaddr 0x0000000000400254 paddr 0x0000000000400254 align 2**2

         filesz 0x0000000000000044 memsz 0x0000000000000044 flags r--

EH_FRAME off    0x000000000000064c vaddr 0x000000000040064c paddr 0x000000000040064c align 2**2

         filesz 0x000000000000002c memsz 0x000000000000002c flags r--

   STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3

         filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-

   RELRO off    0x0000000000000e28 vaddr 0x0000000000600e28 paddr 0x0000000000600e28 align 2**0

         filesz 0x00000000000001d8 memsz 0x00000000000001d8 flags r--


Dynamic Section:

  NEEDED               libc.so.6

  INIT                 0x00000000004003f0

  FINI                 0x0000000000400638

  GNU_HASH             0x0000000000400298

  STRTAB               0x0000000000400318

  SYMTAB               0x00000000004002b8

  STRSZ                0x0000000000000053

  SYMENT               0x0000000000000018

  DEBUG                0x0000000000000000

  PLTGOT               0x0000000000600fe8

  PLTRELSZ             0x0000000000000030

  PLTREL               0x0000000000000007

  JMPREL               0x00000000004003c0

  RELA                 0x00000000004003a8

  RELASZ               0x0000000000000018

  RELAENT              0x0000000000000018

  VERNEED              0x0000000000400378

  VERNEEDNUM           0x0000000000000001

  VERSYM               0x000000000040036c


Version References:

  required from libc.so.6:

    0x09691a75 0x00 03 GLIBC_2.2.5

    0x0d696914 0x00 02 GLIBC_2.4


Sections:

Idx Name          Size      VMA               LMA               File off  Algn

  0 .interp       0000001c  0000000000400238  0000000000400238  00000238  2**0

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  1 .note.ABI-tag 00000020  0000000000400254  0000000000400254  00000254  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  2 .note.gnu.build-id 00000024  0000000000400274  0000000000400274  00000274  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  3 .gnu.hash     0000001c  0000000000400298  0000000000400298  00000298  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  4 .dynsym       00000060  00000000004002b8  00000000004002b8  000002b8  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  5 .dynstr       00000053  0000000000400318  0000000000400318  00000318  2**0

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  6 .gnu.version  00000008  000000000040036c  000000000040036c  0000036c  2**1

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  7 .gnu.version_r 00000030  0000000000400378  0000000000400378  00000378  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  8 .rela.dyn     00000018  00000000004003a8  00000000004003a8  000003a8  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  9 .rela.plt     00000030  00000000004003c0  00000000004003c0  000003c0  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 10 .init         00000018  00000000004003f0  00000000004003f0  000003f0  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 11 .plt          00000030  0000000000400410  0000000000400410  00000410  2**4

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 12 .text         000001f8  0000000000400440  0000000000400440  00000440  2**4

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 13 .fini         0000000e  0000000000400638  0000000000400638  00000638  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 14 .rodata       00000004  0000000000400648  0000000000400648  00000648  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 15 .eh_frame_hdr 0000002c  000000000040064c  000000000040064c  0000064c  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 16 .eh_frame     000000a4  0000000000400678  0000000000400678  00000678  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 17 .ctors        00000010  0000000000600e28  0000000000600e28  00000e28  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 18 .dtors        00000010  0000000000600e38  0000000000600e38  00000e38  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 19 .jcr          00000008  0000000000600e48  0000000000600e48  00000e48  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 20 .dynamic      00000190  0000000000600e50  0000000000600e50  00000e50  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 21 .got          00000008  0000000000600fe0  0000000000600fe0  00000fe0  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 22 .got.plt      00000028  0000000000600fe8  0000000000600fe8  00000fe8  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 23 .data         00000010  0000000000601010  0000000000601010  00001010  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 24 .bss          00000010  0000000000601020  0000000000601020  00001020  2**3

                  ALLOC

 25 .comment      0000002a  0000000000000000  0000000000000000  00001020  2**0

                  CONTENTS, READONLY

 26 .debug_aranges 00000030  0000000000000000  0000000000000000  0000104a  2**0

                  CONTENTS, READONLY, DEBUGGING

 27 .debug_info   0000009d  0000000000000000  0000000000000000  0000107a  2**0

                  CONTENTS, READONLY, DEBUGGING

 28 .debug_abbrev 0000006f  0000000000000000  0000000000000000  00001117  2**0

                  CONTENTS, READONLY, DEBUGGING

 29 .debug_line   0000003c  0000000000000000  0000000000000000  00001186  2**0

                  CONTENTS, READONLY, DEBUGGING

 30 .debug_str    0000004c  0000000000000000  0000000000000000  000011c2  2**0

                  CONTENTS, READONLY, DEBUGGING

 31 .debug_loc    00000060  0000000000000000  0000000000000000  0000120e  2**0

                  CONTENTS, READONLY, DEBUGGING

SYMBOL TABLE:

0000000000400238 l    d  .interp        0000000000000000              .interp

0000000000400254 l    d  .note.ABI-tag  0000000000000000              .note.ABI-tag

0000000000400274 l    d  .note.gnu.build-id     0000000000000000              .note.gnu.build-id

0000000000400298 l    d  .gnu.hash      0000000000000000              .gnu.hash

00000000004002b8 l    d  .dynsym        0000000000000000              .dynsym

0000000000400318 l    d  .dynstr        0000000000000000              .dynstr

000000000040036c l    d  .gnu.version   0000000000000000              .gnu.version

0000000000400378 l    d  .gnu.version_r 0000000000000000              .gnu.version_r

00000000004003a8 l    d  .rela.dyn      0000000000000000              .rela.dyn

00000000004003c0 l    d  .rela.plt      0000000000000000              .rela.plt

00000000004003f0 l    d  .init  0000000000000000              .init

0000000000400410 l    d  .plt   0000000000000000              .plt

0000000000400440 l    d  .text  0000000000000000              .text

0000000000400638 l    d  .fini  0000000000000000              .fini

0000000000400648 l    d  .rodata        0000000000000000              .rodata

000000000040064c l    d  .eh_frame_hdr  0000000000000000              .eh_frame_hdr

0000000000400678 l    d  .eh_frame      0000000000000000              .eh_frame

0000000000600e28 l    d  .ctors 0000000000000000              .ctors

0000000000600e38 l    d  .dtors 0000000000000000              .dtors

0000000000600e48 l    d  .jcr   0000000000000000              .jcr

0000000000600e50 l    d  .dynamic       0000000000000000              .dynamic

0000000000600fe0 l    d  .got   0000000000000000              .got

0000000000600fe8 l    d  .got.plt       0000000000000000              .got.plt

0000000000601010 l    d  .data  0000000000000000              .data

0000000000601020 l    d  .bss   0000000000000000              .bss

0000000000000000 l    d  .comment       0000000000000000              .comment

0000000000000000 l    d  .debug_aranges 0000000000000000              .debug_aranges

0000000000000000 l    d  .debug_info    0000000000000000              .debug_info

0000000000000000 l    d  .debug_abbrev  0000000000000000              .debug_abbrev

0000000000000000 l    d  .debug_line    0000000000000000              .debug_line

0000000000000000 l    d  .debug_str     0000000000000000              .debug_str

0000000000000000 l    d  .debug_loc     0000000000000000              .debug_loc

000000000040046c l     F .text  0000000000000000              call_gmon_start

0000000000000000 l    df *ABS*  0000000000000000              crtstuff.c

0000000000600e28 l     O .ctors 0000000000000000              __CTOR_LIST__

0000000000600e38 l     O .dtors 0000000000000000              __DTOR_LIST__

0000000000600e48 l     O .jcr   0000000000000000              __JCR_LIST__

0000000000400490 l     F .text  0000000000000000              __do_global_dtors_aux

0000000000601020 l     O .bss   0000000000000001              completed.6531

0000000000601028 l     O .bss   0000000000000008              dtor_idx.6533

0000000000400500 l     F .text  0000000000000000              frame_dummy

0000000000000000 l    df *ABS*  0000000000000000              crtstuff.c

0000000000600e30 l     O .ctors 0000000000000000              __CTOR_END__

0000000000400718 l     O .eh_frame      0000000000000000              __FRAME_END__

0000000000600e48 l     O .jcr   0000000000000000              __JCR_END__

0000000000400600 l     F .text  0000000000000000              __do_global_ctors_aux

0000000000000000 l    df *ABS*  0000000000000000              tttt.c

0000000000600e24 l       .ctors 0000000000000000              __init_array_end

0000000000600e50 l     O .dynamic       0000000000000000              _DYNAMIC

0000000000600e24 l       .ctors 0000000000000000              __init_array_start

0000000000600fe8 l     O .got.plt       0000000000000000              _GLOBAL_OFFSET_TABLE_

00000000004005f0 g     F .text  0000000000000002              __libc_csu_fini

0000000000601010  w      .data  0000000000000000              data_start

0000000000601020 g       *ABS*  0000000000000000              _edata

0000000000400638 g     F .fini  0000000000000000              _fini

0000000000000000       F *UND*  0000000000000000              __stack_chk_fail@@GLIBC_2.4

0000000000600e40 g     O .dtors 0000000000000000              .hidden __DTOR_END__

0000000000000000       F *UND*  0000000000000000              __libc_start_main@@GLIBC_2.2.5

0000000000601010 g       .data  0000000000000000              __data_start

0000000000000000  w      *UND*  0000000000000000              __gmon_start__

0000000000601018 g     O .data  0000000000000000              .hidden __dso_handle

0000000000400648 g     O .rodata        0000000000000004              _IO_stdin_used

0000000000400560 g     F .text  0000000000000089              __libc_csu_init

0000000000601030 g       *ABS*  0000000000000000              _end

0000000000400440 g     F .text  0000000000000000              _start

0000000000601020 g       *ABS*  0000000000000000              __bss_start

0000000000400524 g     F .text  0000000000000036              main

0000000000000000  w      *UND*  0000000000000000              _Jv_RegisterClasses

00000000004003f0 g     F .init  0000000000000000              _init 


프로파일링 추가

$ gcc -pg tttt.c

$ objdump -x a.out


a.out:     file format elf64-x86-64

a.out

architecture: i386:x86-64, flags 0x00000112:

EXEC_P, HAS_SYMS, D_PAGED

start address 0x0000000000400570


Program Header:

    PHDR off    0x0000000000000040 vaddr 0x0000000000400040 paddr 0x0000000000400040 align 2**3

         filesz 0x00000000000001f8 memsz 0x00000000000001f8 flags r-x

  INTERP off    0x0000000000000238 vaddr 0x0000000000400238 paddr 0x0000000000400238 align 2**0

         filesz 0x000000000000001c memsz 0x000000000000001c flags r--

    LOAD off    0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**21

         filesz 0x00000000000008c4 memsz 0x00000000000008c4 flags r-x

    LOAD off    0x0000000000000e20 vaddr 0x0000000000600e20 paddr 0x0000000000600e20 align 2**21

         filesz 0x0000000000000220 memsz 0x0000000000000238 flags rw-

 DYNAMIC off    0x0000000000000e48 vaddr 0x0000000000600e48 paddr 0x0000000000600e48 align 2**3

         filesz 0x0000000000000190 memsz 0x0000000000000190 flags rw-

    NOTE off    0x0000000000000254 vaddr 0x0000000000400254 paddr 0x0000000000400254 align 2**2

         filesz 0x0000000000000044 memsz 0x0000000000000044 flags r--

EH_FRAME off    0x00000000000007dc vaddr 0x00000000004007dc paddr 0x00000000004007dc align 2**2

         filesz 0x0000000000000034 memsz 0x0000000000000034 flags r--

   STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3

         filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-

   RELRO off    0x0000000000000e20 vaddr 0x0000000000600e20 paddr 0x0000000000600e20 align 2**0

         filesz 0x00000000000001e0 memsz 0x00000000000001e0 flags r--


Dynamic Section:

  NEEDED               libc.so.6

  INIT                 0x00000000004004e8

  FINI                 0x00000000004007c8

  GNU_HASH             0x0000000000400298

  STRTAB               0x0000000000400380

  SYMTAB               0x00000000004002c0

  STRSZ                0x000000000000007e

  SYMENT               0x0000000000000018

  DEBUG                0x0000000000000000

  PLTGOT               0x0000000000600fe8

  PLTRELSZ             0x0000000000000090

  PLTREL               0x0000000000000007

  JMPREL               0x0000000000400458

  RELA                 0x0000000000400440

  RELASZ               0x0000000000000018

  RELAENT              0x0000000000000018

  VERNEED              0x0000000000400410

  VERNEEDNUM           0x0000000000000001

  VERSYM               0x00000000004003fe


Version References:

  required from libc.so.6:

    0x09691a75 0x00 03 GLIBC_2.2.5

    0x0d696914 0x00 02 GLIBC_2.4


Sections:

Idx Name          Size      VMA               LMA               File off  Algn

  0 .interp       0000001c  0000000000400238  0000000000400238  00000238  2**0

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  1 .note.ABI-tag 00000020  0000000000400254  0000000000400254  00000254  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  2 .note.gnu.build-id 00000024  0000000000400274  0000000000400274  00000274  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  3 .gnu.hash     00000028  0000000000400298  0000000000400298  00000298  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  4 .dynsym       000000c0  00000000004002c0  00000000004002c0  000002c0  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  5 .dynstr       0000007e  0000000000400380  0000000000400380  00000380  2**0

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  6 .gnu.version  00000010  00000000004003fe  00000000004003fe  000003fe  2**1

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  7 .gnu.version_r 00000030  0000000000400410  0000000000400410  00000410  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  8 .rela.dyn     00000018  0000000000400440  0000000000400440  00000440  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  9 .rela.plt     00000090  0000000000400458  0000000000400458  00000458  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 10 .init         00000018  00000000004004e8  00000000004004e8  000004e8  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 11 .plt          00000070  0000000000400500  0000000000400500  00000500  2**4

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 12 .text         00000258  0000000000400570  0000000000400570  00000570  2**4

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 13 .fini         0000000e  00000000004007c8  00000000004007c8  000007c8  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 14 .rodata       00000004  00000000004007d8  00000000004007d8  000007d8  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 15 .eh_frame_hdr 00000034  00000000004007dc  00000000004007dc  000007dc  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 16 .eh_frame     000000b4  0000000000400810  0000000000400810  00000810  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 17 .ctors        00000010  0000000000600e20  0000000000600e20  00000e20  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 18 .dtors        00000010  0000000000600e30  0000000000600e30  00000e30  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 19 .jcr          00000008  0000000000600e40  0000000000600e40  00000e40  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 20 .dynamic      00000190  0000000000600e48  0000000000600e48  00000e48  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 21 .got          00000010  0000000000600fd8  0000000000600fd8  00000fd8  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 22 .got.plt      00000048  0000000000600fe8  0000000000600fe8  00000fe8  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 23 .data         00000010  0000000000601030  0000000000601030  00001030  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 24 .bss          00000018  0000000000601040  0000000000601040  00001040  2**4

                  ALLOC

 25 .comment      0000002a  0000000000000000  0000000000000000  00001040  2**0

                  CONTENTS, READONLY

SYMBOL TABLE:

0000000000400238 l    d  .interp        0000000000000000              .interp

0000000000400254 l    d  .note.ABI-tag  0000000000000000              .note.ABI-tag

0000000000400274 l    d  .note.gnu.build-id     0000000000000000              .note.gnu.build-id

0000000000400298 l    d  .gnu.hash      0000000000000000              .gnu.hash

00000000004002c0 l    d  .dynsym        0000000000000000              .dynsym

0000000000400380 l    d  .dynstr        0000000000000000              .dynstr

00000000004003fe l    d  .gnu.version   0000000000000000              .gnu.version

0000000000400410 l    d  .gnu.version_r 0000000000000000              .gnu.version_r

0000000000400440 l    d  .rela.dyn      0000000000000000              .rela.dyn

0000000000400458 l    d  .rela.plt      0000000000000000              .rela.plt

00000000004004e8 l    d  .init  0000000000000000              .init

0000000000400500 l    d  .plt   0000000000000000              .plt

0000000000400570 l    d  .text  0000000000000000              .text

00000000004007c8 l    d  .fini  0000000000000000              .fini

00000000004007d8 l    d  .rodata        0000000000000000              .rodata

00000000004007dc l    d  .eh_frame_hdr  0000000000000000              .eh_frame_hdr

0000000000400810 l    d  .eh_frame      0000000000000000              .eh_frame

0000000000600e20 l    d  .ctors 0000000000000000              .ctors

0000000000600e30 l    d  .dtors 0000000000000000              .dtors

0000000000600e40 l    d  .jcr   0000000000000000              .jcr

0000000000600e48 l    d  .dynamic       0000000000000000              .dynamic

0000000000600fd8 l    d  .got   0000000000000000              .got

0000000000600fe8 l    d  .got.plt       0000000000000000              .got.plt

0000000000601030 l    d  .data  0000000000000000              .data

0000000000601040 l    d  .bss   0000000000000000              .bss

0000000000000000 l    d  .comment       0000000000000000              .comment

0000000000601040 l     O .bss   0000000000000004              called.4053

00000000004005e0 l     F .text  0000000000000000              call_gmon_start

0000000000000000 l    df *ABS*  0000000000000000              crtstuff.c

0000000000600e20 l     O .ctors 0000000000000000              __CTOR_LIST__

0000000000600e30 l     O .dtors 0000000000000000              __DTOR_LIST__

0000000000600e40 l     O .jcr   0000000000000000              __JCR_LIST__

0000000000400600 l     F .text  0000000000000000              __do_global_dtors_aux

0000000000601048 l     O .bss   0000000000000001              completed.6531

0000000000601050 l     O .bss   0000000000000008              dtor_idx.6533

0000000000400670 l     F .text  0000000000000000              frame_dummy

0000000000000000 l    df *ABS*  0000000000000000              crtstuff.c

0000000000600e28 l     O .ctors 0000000000000000              __CTOR_END__

00000000004008c0 l     O .eh_frame      0000000000000000              __FRAME_END__

0000000000600e40 l     O .jcr   0000000000000000              __JCR_END__

0000000000400790 l     F .text  0000000000000000              __do_global_ctors_aux

0000000000000000 l    df *ABS*  0000000000000000              tttt.c

0000000000600e1c l       .ctors 0000000000000000              __init_array_end

0000000000601038 l     O .data  0000000000000000              __dso_handle

0000000000600e48 l     O .dynamic       0000000000000000              _DYNAMIC

0000000000600e1c l       .ctors 0000000000000000              __init_array_start

0000000000600fe8 l     O .got.plt       0000000000000000              _GLOBAL_OFFSET_TABLE_

0000000000400760 g     F .text  0000000000000002              __libc_csu_fini

0000000000601030  w      .data  0000000000000000              data_start

0000000000400770 g     F .text  000000000000001a              .hidden atexit

0000000000601040 g       *ABS*  0000000000000000              _edata

00000000004007c8 g     F .fini  0000000000000000              _fini

0000000000000000       F *UND*  0000000000000000              __stack_chk_fail@@GLIBC_2.4

0000000000400520       F *UND*  0000000000000000              _mcleanup@@GLIBC_2.2.5

0000000000600e38 g     O .dtors 0000000000000000              .hidden __DTOR_END__

0000000000000000       F *UND*  0000000000000000              __libc_start_main@@GLIBC_2.2.5

0000000000601030 g       .data  0000000000000000              __data_start

0000000000000000       F *UND*  0000000000000000              __monstartup@@GLIBC_2.2.5

00000000004005a0 g     F .text  000000000000003f              __gmon_start__

00000000004007d8 g     O .rodata        0000000000000004              _IO_stdin_used

00000000004006d0 g     F .text  0000000000000089              __libc_csu_init

0000000000601058 g       *ABS*  0000000000000000              _end

0000000000400570 g     F .text  0000000000000000              _start

0000000000601040 g       *ABS*  0000000000000000              __bss_start

0000000000400694 g     F .text  000000000000003b              main

0000000000000000       F *UND*  0000000000000000              mcount@@GLIBC_2.2.5

00000000004007d6 g       *ABS*  0000000000000000              etext

0000000000000000  w      *UND*  0000000000000000              _Jv_RegisterClasses

0000000000000000       F *UND*  0000000000000000              __cxa_atexit@@GLIBC_2.2.5

00000000004004e8 g     F .init  0000000000000000              _init 


디버깅, 프로파일링 추가

$ gcc -g -pg tttt.c

$ objdump -x a.out


a.out:     file format elf64-x86-64

a.out

architecture: i386:x86-64, flags 0x00000112:

EXEC_P, HAS_SYMS, D_PAGED

start address 0x0000000000400570


Program Header:

    PHDR off    0x0000000000000040 vaddr 0x0000000000400040 paddr 0x0000000000400040 align 2**3

         filesz 0x00000000000001f8 memsz 0x00000000000001f8 flags r-x

  INTERP off    0x0000000000000238 vaddr 0x0000000000400238 paddr 0x0000000000400238 align 2**0

         filesz 0x000000000000001c memsz 0x000000000000001c flags r--

    LOAD off    0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**21

         filesz 0x00000000000008c4 memsz 0x00000000000008c4 flags r-x

    LOAD off    0x0000000000000e20 vaddr 0x0000000000600e20 paddr 0x0000000000600e20 align 2**21

         filesz 0x0000000000000220 memsz 0x0000000000000238 flags rw-

 DYNAMIC off    0x0000000000000e48 vaddr 0x0000000000600e48 paddr 0x0000000000600e48 align 2**3

         filesz 0x0000000000000190 memsz 0x0000000000000190 flags rw-

    NOTE off    0x0000000000000254 vaddr 0x0000000000400254 paddr 0x0000000000400254 align 2**2

         filesz 0x0000000000000044 memsz 0x0000000000000044 flags r--

EH_FRAME off    0x00000000000007dc vaddr 0x00000000004007dc paddr 0x00000000004007dc align 2**2

         filesz 0x0000000000000034 memsz 0x0000000000000034 flags r--

   STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3

         filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-

   RELRO off    0x0000000000000e20 vaddr 0x0000000000600e20 paddr 0x0000000000600e20 align 2**0

         filesz 0x00000000000001e0 memsz 0x00000000000001e0 flags r--


Dynamic Section:

  NEEDED               libc.so.6

  INIT                 0x00000000004004e8

  FINI                 0x00000000004007c8

  GNU_HASH             0x0000000000400298

  STRTAB               0x0000000000400380

  SYMTAB               0x00000000004002c0

  STRSZ                0x000000000000007e

  SYMENT               0x0000000000000018

  DEBUG                0x0000000000000000

  PLTGOT               0x0000000000600fe8

  PLTRELSZ             0x0000000000000090

  PLTREL               0x0000000000000007

  JMPREL               0x0000000000400458

  RELA                 0x0000000000400440

  RELASZ               0x0000000000000018

  RELAENT              0x0000000000000018

  VERNEED              0x0000000000400410

  VERNEEDNUM           0x0000000000000001

  VERSYM               0x00000000004003fe


Version References:

  required from libc.so.6:

    0x09691a75 0x00 03 GLIBC_2.2.5

    0x0d696914 0x00 02 GLIBC_2.4


Sections:

Idx Name          Size      VMA               LMA               File off  Algn

  0 .interp       0000001c  0000000000400238  0000000000400238  00000238  2**0

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  1 .note.ABI-tag 00000020  0000000000400254  0000000000400254  00000254  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  2 .note.gnu.build-id 00000024  0000000000400274  0000000000400274  00000274  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  3 .gnu.hash     00000028  0000000000400298  0000000000400298  00000298  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  4 .dynsym       000000c0  00000000004002c0  00000000004002c0  000002c0  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  5 .dynstr       0000007e  0000000000400380  0000000000400380  00000380  2**0

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  6 .gnu.version  00000010  00000000004003fe  00000000004003fe  000003fe  2**1

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  7 .gnu.version_r 00000030  0000000000400410  0000000000400410  00000410  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  8 .rela.dyn     00000018  0000000000400440  0000000000400440  00000440  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  9 .rela.plt     00000090  0000000000400458  0000000000400458  00000458  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 10 .init         00000018  00000000004004e8  00000000004004e8  000004e8  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 11 .plt          00000070  0000000000400500  0000000000400500  00000500  2**4

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 12 .text         00000258  0000000000400570  0000000000400570  00000570  2**4

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 13 .fini         0000000e  00000000004007c8  00000000004007c8  000007c8  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 14 .rodata       00000004  00000000004007d8  00000000004007d8  000007d8  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 15 .eh_frame_hdr 00000034  00000000004007dc  00000000004007dc  000007dc  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 16 .eh_frame     000000b4  0000000000400810  0000000000400810  00000810  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 17 .ctors        00000010  0000000000600e20  0000000000600e20  00000e20  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 18 .dtors        00000010  0000000000600e30  0000000000600e30  00000e30  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 19 .jcr          00000008  0000000000600e40  0000000000600e40  00000e40  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 20 .dynamic      00000190  0000000000600e48  0000000000600e48  00000e48  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 21 .got          00000010  0000000000600fd8  0000000000600fd8  00000fd8  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 22 .got.plt      00000048  0000000000600fe8  0000000000600fe8  00000fe8  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 23 .data         00000010  0000000000601030  0000000000601030  00001030  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 24 .bss          00000018  0000000000601040  0000000000601040  00001040  2**4

                  ALLOC

 25 .comment      0000002a  0000000000000000  0000000000000000  00001040  2**0

                  CONTENTS, READONLY

 26 .debug_aranges 00000030  0000000000000000  0000000000000000  0000106a  2**0

                  CONTENTS, READONLY, DEBUGGING

 27 .debug_info   0000009d  0000000000000000  0000000000000000  0000109a  2**0

                  CONTENTS, READONLY, DEBUGGING

 28 .debug_abbrev 0000006f  0000000000000000  0000000000000000  00001137  2**0

                  CONTENTS, READONLY, DEBUGGING

 29 .debug_line   0000003c  0000000000000000  0000000000000000  000011a6  2**0

                  CONTENTS, READONLY, DEBUGGING

 30 .debug_str    0000004c  0000000000000000  0000000000000000  000011e2  2**0

                  CONTENTS, READONLY, DEBUGGING

 31 .debug_loc    00000060  0000000000000000  0000000000000000  0000122e  2**0

                  CONTENTS, READONLY, DEBUGGING

SYMBOL TABLE:

0000000000400238 l    d  .interp        0000000000000000              .interp

0000000000400254 l    d  .note.ABI-tag  0000000000000000              .note.ABI-tag

0000000000400274 l    d  .note.gnu.build-id     0000000000000000              .note.gnu.build-id

0000000000400298 l    d  .gnu.hash      0000000000000000              .gnu.hash

00000000004002c0 l    d  .dynsym        0000000000000000              .dynsym

0000000000400380 l    d  .dynstr        0000000000000000              .dynstr

00000000004003fe l    d  .gnu.version   0000000000000000              .gnu.version

0000000000400410 l    d  .gnu.version_r 0000000000000000              .gnu.version_r

0000000000400440 l    d  .rela.dyn      0000000000000000              .rela.dyn

0000000000400458 l    d  .rela.plt      0000000000000000              .rela.plt

00000000004004e8 l    d  .init  0000000000000000              .init

0000000000400500 l    d  .plt   0000000000000000              .plt

0000000000400570 l    d  .text  0000000000000000              .text

00000000004007c8 l    d  .fini  0000000000000000              .fini

00000000004007d8 l    d  .rodata        0000000000000000              .rodata

00000000004007dc l    d  .eh_frame_hdr  0000000000000000              .eh_frame_hdr

0000000000400810 l    d  .eh_frame      0000000000000000              .eh_frame

0000000000600e20 l    d  .ctors 0000000000000000              .ctors

0000000000600e30 l    d  .dtors 0000000000000000              .dtors

0000000000600e40 l    d  .jcr   0000000000000000              .jcr

0000000000600e48 l    d  .dynamic       0000000000000000              .dynamic

0000000000600fd8 l    d  .got   0000000000000000              .got

0000000000600fe8 l    d  .got.plt       0000000000000000              .got.plt

0000000000601030 l    d  .data  0000000000000000              .data

0000000000601040 l    d  .bss   0000000000000000              .bss

0000000000000000 l    d  .comment       0000000000000000              .comment

0000000000000000 l    d  .debug_aranges 0000000000000000              .debug_aranges

0000000000000000 l    d  .debug_info    0000000000000000              .debug_info

0000000000000000 l    d  .debug_abbrev  0000000000000000              .debug_abbrev

0000000000000000 l    d  .debug_line    0000000000000000              .debug_line

0000000000000000 l    d  .debug_str     0000000000000000              .debug_str

0000000000000000 l    d  .debug_loc     0000000000000000              .debug_loc

0000000000601040 l     O .bss   0000000000000004              called.4053

00000000004005e0 l     F .text  0000000000000000              call_gmon_start

0000000000000000 l    df *ABS*  0000000000000000              crtstuff.c

0000000000600e20 l     O .ctors 0000000000000000              __CTOR_LIST__

0000000000600e30 l     O .dtors 0000000000000000              __DTOR_LIST__

0000000000600e40 l     O .jcr   0000000000000000              __JCR_LIST__

0000000000400600 l     F .text  0000000000000000              __do_global_dtors_aux

0000000000601048 l     O .bss   0000000000000001              completed.6531

0000000000601050 l     O .bss   0000000000000008              dtor_idx.6533

0000000000400670 l     F .text  0000000000000000              frame_dummy

0000000000000000 l    df *ABS*  0000000000000000              crtstuff.c

0000000000600e28 l     O .ctors 0000000000000000              __CTOR_END__

00000000004008c0 l     O .eh_frame      0000000000000000              __FRAME_END__

0000000000600e40 l     O .jcr   0000000000000000              __JCR_END__

0000000000400790 l     F .text  0000000000000000              __do_global_ctors_aux

0000000000000000 l    df *ABS*  0000000000000000              tttt.c

0000000000600e1c l       .ctors 0000000000000000              __init_array_end

0000000000601038 l     O .data  0000000000000000              __dso_handle

0000000000600e48 l     O .dynamic       0000000000000000              _DYNAMIC

0000000000600e1c l       .ctors 0000000000000000              __init_array_start

0000000000600fe8 l     O .got.plt       0000000000000000              _GLOBAL_OFFSET_TABLE_

0000000000400760 g     F .text  0000000000000002              __libc_csu_fini

0000000000601030  w      .data  0000000000000000              data_start

0000000000400770 g     F .text  000000000000001a              .hidden atexit

0000000000601040 g       *ABS*  0000000000000000              _edata

00000000004007c8 g     F .fini  0000000000000000              _fini

0000000000000000       F *UND*  0000000000000000              __stack_chk_fail@@GLIBC_2.4

0000000000400520       F *UND*  0000000000000000              _mcleanup@@GLIBC_2.2.5

0000000000600e38 g     O .dtors 0000000000000000              .hidden __DTOR_END__

0000000000000000       F *UND*  0000000000000000              __libc_start_main@@GLIBC_2.2.5

0000000000601030 g       .data  0000000000000000              __data_start

0000000000000000       F *UND*  0000000000000000              __monstartup@@GLIBC_2.2.5

00000000004005a0 g     F .text  000000000000003f              __gmon_start__

00000000004007d8 g     O .rodata        0000000000000004              _IO_stdin_used

00000000004006d0 g     F .text  0000000000000089              __libc_csu_init

0000000000601058 g       *ABS*  0000000000000000              _end

0000000000400570 g     F .text  0000000000000000              _start

0000000000601040 g       *ABS*  0000000000000000              __bss_start

0000000000400694 g     F .text  000000000000003b              main

0000000000000000       F *UND*  0000000000000000              mcount@@GLIBC_2.2.5

00000000004007d6 g       *ABS*  0000000000000000              etext

0000000000000000  w      *UND*  0000000000000000              _Jv_RegisterClasses

0000000000000000       F *UND*  0000000000000000              __cxa_atexit@@GLIBC_2.2.5

00000000004004e8 g     F .init  0000000000000000              _init 


스트라이핑

$ gcc -g -pg tttt.c

$ strip a.out

$ objdump -x a.out


a.out:     file format elf64-x86-64

a.out

architecture: i386:x86-64, flags 0x00000112:

EXEC_P, HAS_SYMS, D_PAGED

start address 0x0000000000400570


Program Header:

    PHDR off    0x0000000000000040 vaddr 0x0000000000400040 paddr 0x0000000000400040 align 2**3

         filesz 0x00000000000001f8 memsz 0x00000000000001f8 flags r-x

  INTERP off    0x0000000000000238 vaddr 0x0000000000400238 paddr 0x0000000000400238 align 2**0

         filesz 0x000000000000001c memsz 0x000000000000001c flags r--

    LOAD off    0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**21

         filesz 0x00000000000008c4 memsz 0x00000000000008c4 flags r-x

    LOAD off    0x0000000000000e20 vaddr 0x0000000000600e20 paddr 0x0000000000600e20 align 2**21

         filesz 0x0000000000000220 memsz 0x0000000000000238 flags rw-

 DYNAMIC off    0x0000000000000e48 vaddr 0x0000000000600e48 paddr 0x0000000000600e48 align 2**3

         filesz 0x0000000000000190 memsz 0x0000000000000190 flags rw-

    NOTE off    0x0000000000000254 vaddr 0x0000000000400254 paddr 0x0000000000400254 align 2**2

         filesz 0x0000000000000044 memsz 0x0000000000000044 flags r--

EH_FRAME off    0x00000000000007dc vaddr 0x00000000004007dc paddr 0x00000000004007dc align 2**2

         filesz 0x0000000000000034 memsz 0x0000000000000034 flags r--

   STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3

         filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-

   RELRO off    0x0000000000000e20 vaddr 0x0000000000600e20 paddr 0x0000000000600e20 align 2**0

         filesz 0x00000000000001e0 memsz 0x00000000000001e0 flags r--


Dynamic Section:

  NEEDED               libc.so.6

  INIT                 0x00000000004004e8

  FINI                 0x00000000004007c8

  GNU_HASH             0x0000000000400298

  STRTAB               0x0000000000400380

  SYMTAB               0x00000000004002c0

  STRSZ                0x000000000000007e

  SYMENT               0x0000000000000018

  DEBUG                0x0000000000000000

  PLTGOT               0x0000000000600fe8

  PLTRELSZ             0x0000000000000090

  PLTREL               0x0000000000000007

  JMPREL               0x0000000000400458

  RELA                 0x0000000000400440

  RELASZ               0x0000000000000018

  RELAENT              0x0000000000000018

  VERNEED              0x0000000000400410

  VERNEEDNUM           0x0000000000000001

  VERSYM               0x00000000004003fe


Version References:

  required from libc.so.6:

    0x09691a75 0x00 03 GLIBC_2.2.5

    0x0d696914 0x00 02 GLIBC_2.4


Sections:

Idx Name          Size      VMA               LMA               File off  Algn

  0 .interp       0000001c  0000000000400238  0000000000400238  00000238  2**0

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  1 .note.ABI-tag 00000020  0000000000400254  0000000000400254  00000254  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  2 .note.gnu.build-id 00000024  0000000000400274  0000000000400274  00000274  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  3 .gnu.hash     00000028  0000000000400298  0000000000400298  00000298  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  4 .dynsym       000000c0  00000000004002c0  00000000004002c0  000002c0  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  5 .dynstr       0000007e  0000000000400380  0000000000400380  00000380  2**0

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  6 .gnu.version  00000010  00000000004003fe  00000000004003fe  000003fe  2**1

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  7 .gnu.version_r 00000030  0000000000400410  0000000000400410  00000410  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  8 .rela.dyn     00000018  0000000000400440  0000000000400440  00000440  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

  9 .rela.plt     00000090  0000000000400458  0000000000400458  00000458  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 10 .init         00000018  00000000004004e8  00000000004004e8  000004e8  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 11 .plt          00000070  0000000000400500  0000000000400500  00000500  2**4

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 12 .text         00000258  0000000000400570  0000000000400570  00000570  2**4

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 13 .fini         0000000e  00000000004007c8  00000000004007c8  000007c8  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, CODE

 14 .rodata       00000004  00000000004007d8  00000000004007d8  000007d8  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 15 .eh_frame_hdr 00000034  00000000004007dc  00000000004007dc  000007dc  2**2

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 16 .eh_frame     000000b4  0000000000400810  0000000000400810  00000810  2**3

                  CONTENTS, ALLOC, LOAD, READONLY, DATA

 17 .ctors        00000010  0000000000600e20  0000000000600e20  00000e20  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 18 .dtors        00000010  0000000000600e30  0000000000600e30  00000e30  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 19 .jcr          00000008  0000000000600e40  0000000000600e40  00000e40  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 20 .dynamic      00000190  0000000000600e48  0000000000600e48  00000e48  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 21 .got          00000010  0000000000600fd8  0000000000600fd8  00000fd8  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 22 .got.plt      00000048  0000000000600fe8  0000000000600fe8  00000fe8  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 23 .data         00000010  0000000000601030  0000000000601030  00001030  2**3

                  CONTENTS, ALLOC, LOAD, DATA

 24 .bss          00000018  0000000000601040  0000000000601040  00001040  2**4

                  ALLOC

 25 .comment      0000002a  0000000000000000  0000000000000000  00001040  2**0

                  CONTENTS, READONLY

SYMBOL TABLE:

no symbols 


프로파일링 관련 gmon_start와 -pg 옵션 없을때 주소값의 차이

You can see here, that the symbol value of __gmon_start__ is set to 00000000.

[링크 : http://stackoverflow.com/questions/12697081/what-is-gmon-start-symbol]

'Linux' 카테고리의 다른 글

AMD avx 리눅스 식별자  (0) 2016.03.08
리눅스용 비디오 편집 프로그램  (0) 2016.03.02
iotop  (0) 2016.01.19
리눅스에서 메모리 뱅크 확인하기  (0) 2015.10.30
IIO - Industrial I/O  (2) 2015.09.03
Posted by 구차니
embeded/Cortex-M3 Ti2016. 2. 18. 14:57

master 인터럽트를 disable 하면 어떻게 작동할까?

우연히 그 타이밍에 발생할 인터럽트가 있었다면.. pending 될까? 아니면 그냥 잊혀지는걸까?



SW-DRL-UG-6288.pdf


13.2.2.3 IntMasterDisable

Disables the processor interrupt.

Prototype:

tBoolean

IntMasterDisable(void)

Description:

Prevents the processor from receiving interrupts. This does not affect the set of interrupts

enabled in the interrupt controller; it just gates the single interrupt from the controller to the

processor.

Note:

Previously, this function had no return value. As such, it was possible to include interrupt.h

and call this function without having included hw_types.h. Now that the return is a

tBoolean, a compiler error will occur in this case. The solution is to include hw_types.h

before including interrupt.h.

Returns:

Returns true if interrupts were already disabled when the function was called or false if they

were initially enabled.


13.2.2.4 IntMasterEnable

Enables the processor interrupt.

Prototype:

tBoolean

IntMasterEnable(void)

Description:

Allows the processor to respond to interrupts. This does not affect the set of interrupts enabled

in the interrupt controller; it just gates the single interrupt from the controller to the processor.

Note:

Previously, this function had no return value. As such, it was possible to include interrupt.h

and call this function without having included hw_types.h. Now that the return is a

tBoolean, a compiler error will occur in this case. The solution is to include hw_types.h

before including interrupt.h.

Returns:

Returns true if interrupts were disabled when the function was called or false if they were

initially enabled.


13.2.2.5 IntPendClear

Unpends an interrupt.

Prototype:

void

IntPendClear(unsigned long ulInterrupt)

Parameters:

ulInterrupt specifies the interrupt to be unpended.

Description:

The specified interrupt is unpended in the interrupt controller. This will cause any previously

generated interrupts that have not been handled yet (due to higher priority interrupts or the

interrupt no having been enabled yet) to be discarded.

Returns:

None.


13.2.2.6 IntPendSet

Pends an interrupt.

Prototype:

void

IntPendSet(unsigned long ulInterrupt)

Parameters:

ulInterrupt specifies the interrupt to be pended.

Description:

The specified interrupt is pended in the interrupt controller. This will cause the interrupt con

troller to execute the corresponding interrupt handler at the next available time, based on the

current interrupt state priorities. For example, if called by a higher priority interrupt handler,

the specified interrupt handler will not be called until after the current interrupt handler has

completed execution. The interrupt must have been enabled for it to be called.

Returns:

None.



interrupt.c


tBoolean

IntMasterEnable(void)

{

    //

    // Enable processor interrupts.

    //

    return(CPUcpsie());

}


tBoolean

IntMasterDisable(void)

{

    //

    // Disable processor interrupts.

    //

    return(CPUcpsid());

}


void

IntEnable(unsigned long ulInterrupt)

{

    //

    // Check the arguments.

    //

    ASSERT(ulInterrupt < NUM_INTERRUPTS);


    //

    // Determine the interrupt to enable.

    //

    if(ulInterrupt == FAULT_MPU)

    {

        //

        // Enable the MemManage interrupt.

        //

        HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_MEM;

    }

    else if(ulInterrupt == FAULT_BUS)

    {

        //

        // Enable the bus fault interrupt.

        //

        HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_BUS;

    }

    else if(ulInterrupt == FAULT_USAGE)

    {

        //

        // Enable the usage fault interrupt.

        //

        HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_USAGE;

    }

    else if(ulInterrupt == FAULT_SYSTICK)

    {

        //

        // Enable the System Tick interrupt.

        //

        HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_INTEN;

    }

    else if((ulInterrupt >= 16) && (ulInterrupt <= 47))

    {

        //

        // Enable the general interrupt.

        //

        HWREG(NVIC_EN0) = 1 << (ulInterrupt - 16);

    }

    else if(ulInterrupt >= 48)

    {

        //

        // Enable the general interrupt.

        //

        HWREG(NVIC_EN1) = 1 << (ulInterrupt - 48);

    }

}


void

IntDisable(unsigned long ulInterrupt)

{

    //

    // Check the arguments.

    //

    ASSERT(ulInterrupt < NUM_INTERRUPTS);


    //

    // Determine the interrupt to disable.

    //

    if(ulInterrupt == FAULT_MPU)

    {

        //

        // Disable the MemManage interrupt.

        //

        HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_MEM);

    }

    else if(ulInterrupt == FAULT_BUS)

    {

        //

        // Disable the bus fault interrupt.

        //

        HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_BUS);

    }

    else if(ulInterrupt == FAULT_USAGE)

    {

        //

        // Disable the usage fault interrupt.

        //

        HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_USAGE);

    }

    else if(ulInterrupt == FAULT_SYSTICK)

    {

        //

        // Disable the System Tick interrupt.

        //

        HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_INTEN);

    }

    else if((ulInterrupt >= 16) && (ulInterrupt <= 47))

    {

        //

        // Disable the general interrupt.

        //

        HWREG(NVIC_DIS0) = 1 << (ulInterrupt - 16);

    }

    else if(ulInterrupt >= 48)

    {

        //

        // Disable the general interrupt.

        //

        HWREG(NVIC_DIS1) = 1 << (ulInterrupt - 48);

    }

}


cpsid / cpsie 어셈블리 인스트럭션을 통해서 마스터 인터럽트를 제어한다.



SetEnable() 시에는 EN0를


SetDisable() 시에는 DIS0를 사용한다.


용도를 찾지 못한.. 이 펜딩.. 머지?



[링크 : http://www.ti.com/lit/ds/spms037g/spms037g.pdf]



음.. disabled interrupt를 펜딩으로 상태를 설정한다?

즉, enable/disable/pending 세가지 상태 중 하나만 가능한건가?


Writing 1 to the ISPR bit corresponding to:

an interrupt that is pending has no effect

a disabled interrupt sets the state of that interrupt to pending.

[링크 :http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/Cihjjifh.html]

'embeded > Cortex-M3 Ti' 카테고리의 다른 글

ekc-lm3s811 를 ICDI로 사용하기  (0) 2016.08.27
cortex-m3 hibernate module...  (0) 2016.04.14
uart tx interrupt  (0) 2015.12.18
coflash 구조 및 에러 메시지..  (0) 2015.12.11
ADCHardwareOversampleConfigure()  (0) 2015.11.17
Posted by 구차니